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): api update #2149

Merged
merged 1 commit into from
Nov 14, 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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1417
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-238bdc2301e165198e92ece05a86c3b80aa6653c5cd7334b3dc59fd9d687acce.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c64fbec9a1e17ca560abf251c26a4adb4d60123dbe3f7dcc10819494cd97a6f.yml
80 changes: 38 additions & 42 deletions src/cloudflare/resources/email_security/investigate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,28 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[InvestigateListResponse]:
"""
This endpoint returns information for each email that matches the search
parameter(s).
Returns information for each email that matches the search parameter(s).

Args:
account_id: Account Identifier

action_log: Controls whether the message action log in included in the response.
action_log: Determines if the message action log is included in the response.

detections_only: If `false`, the search includes non-detections.
detections_only: Determines if the search results will include detections or not.

domain: Filter by the sender domain
domain: The sender domains the search filters by.

end: The end of the search date range. Defaults to `now`.

final_disposition: Filter messages by the provided disposition.
final_disposition: The dispositions the search filters by.

message_action: Filter messages by actions applied to them
message_action: The message actions the search filters by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

query: Space delimited query term(s). The search is case-insensitive.
query: The space-delimited term used in the query. The search is case-insensitive.

The content of the following email metadata fields are searched:

Expand Down Expand Up @@ -183,13 +182,13 @@ def detections(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigateDetectionsResponse:
"""
For emails that have a detection, this endpoint returns detection details such
as threat categories, sender information, and links.
Returns detection details such as threat categories and sender information for
non-benign messages.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -233,7 +232,7 @@ def get(
Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -272,13 +271,13 @@ def preview(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigatePreviewResponse:
"""
For emails that have a detection, this endpoint returns a preview of the message
body as a base64 encoded PNG image.
Returns a preview of the message body as a base64 encoded PNG image for
non-benign messages.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -317,13 +316,12 @@ def raw(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigateRawResponse:
"""
For emails that have a detection, this endpoint returns the raw email as an EML
file.
Returns the raw eml of any non-benign message.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -367,7 +365,7 @@ def trace(
Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -441,29 +439,28 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[InvestigateListResponse, AsyncV4PagePaginationArray[InvestigateListResponse]]:
"""
This endpoint returns information for each email that matches the search
parameter(s).
Returns information for each email that matches the search parameter(s).

Args:
account_id: Account Identifier

action_log: Controls whether the message action log in included in the response.
action_log: Determines if the message action log is included in the response.

detections_only: If `false`, the search includes non-detections.
detections_only: Determines if the search results will include detections or not.

domain: Filter by the sender domain
domain: The sender domains the search filters by.

end: The end of the search date range. Defaults to `now`.

final_disposition: Filter messages by the provided disposition.
final_disposition: The dispositions the search filters by.

message_action: Filter messages by actions applied to them
message_action: The message actions the search filters by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

query: Space delimited query term(s). The search is case-insensitive.
query: The space-delimited term used in the query. The search is case-insensitive.

The content of the following email metadata fields are searched:

Expand Down Expand Up @@ -545,13 +542,13 @@ async def detections(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigateDetectionsResponse:
"""
For emails that have a detection, this endpoint returns detection details such
as threat categories, sender information, and links.
Returns detection details such as threat categories and sender information for
non-benign messages.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -595,7 +592,7 @@ async def get(
Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -634,13 +631,13 @@ async def preview(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigatePreviewResponse:
"""
For emails that have a detection, this endpoint returns a preview of the message
body as a base64 encoded PNG image.
Returns a preview of the message body as a base64 encoded PNG image for
non-benign messages.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -679,13 +676,12 @@ async def raw(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> InvestigateRawResponse:
"""
For emails that have a detection, this endpoint returns the raw email as an EML
file.
Returns the raw eml of any non-benign message.

Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down Expand Up @@ -729,7 +725,7 @@ async def trace(
Args:
account_id: Account Identifier

postfix_id: Message identifier
postfix_id: The identifier of the message.

extra_headers: Send extra headers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[AllowPatternListResponse]:
"""
List, search, and sort an accounts's email allow patterns.
Lists, searches, and sorts an account’s email allow patterns.

Args:
account_id: Account Identifier
Expand All @@ -211,9 +211,9 @@ def list(

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down Expand Up @@ -562,7 +562,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[AllowPatternListResponse, AsyncV4PagePaginationArray[AllowPatternListResponse]]:
"""
List, search, and sort an accounts's email allow patterns.
Lists, searches, and sorts an account’s email allow patterns.

Args:
account_id: Account Identifier
Expand All @@ -571,9 +571,9 @@ def list(

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ def list(

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down Expand Up @@ -521,9 +521,9 @@ def list(

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down
30 changes: 14 additions & 16 deletions src/cloudflare/resources/email_security/settings/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,22 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[DomainListResponse]:
"""
List, search, and sort an account's email domains.
Lists, searches, and sorts an accounts email domains.

Args:
account_id: Account Identifier

allowed_delivery_mode: If present, the response contains only domains with the provided delivery mode.
allowed_delivery_mode: Filters response to domains with the provided delivery mode.

direction: The sorting direction.

domain: Filter result by the provided domains. Allows for multiple occurrences, e.g.,
`domain=example.com&domain=example.xyz`.
domain: Filters results by the provided domains, allowing for multiple occurrences.

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down Expand Up @@ -144,7 +143,7 @@ def delete(
Args:
account_id: Account Identifier

domain_id: Unique domain identifier
domain_id: The unique identifier for the domain.

extra_headers: Send extra headers

Expand Down Expand Up @@ -189,7 +188,7 @@ def edit(
Args:
account_id: Account Identifier

domain_id: Unique domain identifier
domain_id: The unique identifier for the domain.

extra_headers: Send extra headers

Expand Down Expand Up @@ -261,23 +260,22 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[DomainListResponse, AsyncV4PagePaginationArray[DomainListResponse]]:
"""
List, search, and sort an account's email domains.
Lists, searches, and sorts an accounts email domains.

Args:
account_id: Account Identifier

allowed_delivery_mode: If present, the response contains only domains with the provided delivery mode.
allowed_delivery_mode: Filters response to domains with the provided delivery mode.

direction: The sorting direction.

domain: Filter result by the provided domains. Allows for multiple occurrences, e.g.,
`domain=example.com&domain=example.xyz`.
domain: Filters results by the provided domains, allowing for multiple occurrences.

order: The field to sort by.

page: Page number of paginated results.
page: The page number of paginated results.

per_page: Number of results to display.
per_page: The number of results per page.

search: Allows searching in multiple properties of a record simultaneously. This
parameter is intended for human users, not automation. Its exact behavior is
Expand Down Expand Up @@ -335,7 +333,7 @@ async def delete(
Args:
account_id: Account Identifier

domain_id: Unique domain identifier
domain_id: The unique identifier for the domain.

extra_headers: Send extra headers

Expand Down Expand Up @@ -380,7 +378,7 @@ async def edit(
Args:
account_id: Account Identifier

domain_id: Unique domain identifier
domain_id: The unique identifier for the domain.

extra_headers: Send extra headers

Expand Down
Loading