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 #2426

Merged
merged 1 commit into from
Feb 4, 2025
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: 1525
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8bf742ae6e2cee2bd6aaefb44268e1d2242cae3b8057371f5d71c10b4da3f67f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-013c26b947bc82da7dfa6f50d9e66450b455bb9400b244ac190bc6ecaf5c158f.yml
36 changes: 36 additions & 0 deletions src/cloudflare/resources/d1/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def create(
Args:
account_id: Account identifier tag.

name: D1 database name.

primary_location_hint: Specify the region to create the D1 primary, if available. If this option is
omitted, the D1 will be created as close as possible to the current user.

Expand Down Expand Up @@ -187,6 +189,8 @@ def delete(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -236,6 +240,8 @@ def export(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

output_format: Specifies that you will poll this endpoint until the export completes

current_bookmark: To poll an in-progress export, provide the current bookmark (returned by your
Expand Down Expand Up @@ -291,6 +297,8 @@ def get(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -338,6 +346,8 @@ def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you have a new SQL file to upload.

etag: Required when action is 'init' or 'ingest'. An md5 hash of the file you're
Expand Down Expand Up @@ -378,6 +388,8 @@ def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you've finished uploading to tell the D1 to start consuming it

etag: An md5 hash of the file you're uploading. Used to check if it already exists,
Expand Down Expand Up @@ -418,6 +430,8 @@ def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you've finished uploading to tell the D1 to start consuming it

current_bookmark: This identifies the currently-running import, checking its status.
Expand Down Expand Up @@ -498,6 +512,8 @@ def query(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

sql: Your SQL query. Supports multiple statements, joined by semicolons, which will
be executed as a batch.

Expand Down Expand Up @@ -552,6 +568,8 @@ def raw(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

sql: Your SQL query. Supports multiple statements, joined by semicolons, which will
be executed as a batch.

Expand Down Expand Up @@ -624,6 +642,8 @@ async def create(
Args:
account_id: Account identifier tag.

name: D1 database name.

primary_location_hint: Specify the region to create the D1 primary, if available. If this option is
omitted, the D1 will be created as close as possible to the current user.

Expand Down Expand Up @@ -730,6 +750,8 @@ async def delete(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -779,6 +801,8 @@ async def export(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

output_format: Specifies that you will poll this endpoint until the export completes

current_bookmark: To poll an in-progress export, provide the current bookmark (returned by your
Expand Down Expand Up @@ -834,6 +858,8 @@ async def get(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -881,6 +907,8 @@ async def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you have a new SQL file to upload.

etag: Required when action is 'init' or 'ingest'. An md5 hash of the file you're
Expand Down Expand Up @@ -921,6 +949,8 @@ async def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you've finished uploading to tell the D1 to start consuming it

etag: An md5 hash of the file you're uploading. Used to check if it already exists,
Expand Down Expand Up @@ -961,6 +991,8 @@ async def import_(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

action: Indicates you've finished uploading to tell the D1 to start consuming it

current_bookmark: This identifies the currently-running import, checking its status.
Expand Down Expand Up @@ -1041,6 +1073,8 @@ def query(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

sql: Your SQL query. Supports multiple statements, joined by semicolons, which will
be executed as a batch.

Expand Down Expand Up @@ -1095,6 +1129,8 @@ def raw(
Args:
account_id: Account identifier tag.

database_id: D1 database identifier (UUID).

sql: Your SQL query. Supports multiple statements, joined by semicolons, which will
be executed as a batch.

Expand Down
2 changes: 2 additions & 0 deletions src/cloudflare/types/d1/d1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ class D1(BaseModel):
"""The D1 database's size, in bytes."""

name: Optional[str] = None
"""D1 database name."""

num_tables: Optional[float] = None

uuid: Optional[str] = None
"""D1 database identifier (UUID)."""

version: Optional[str] = None
1 change: 1 addition & 0 deletions src/cloudflare/types/d1/database_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class DatabaseCreateParams(TypedDict, total=False):
"""Account identifier tag."""

name: Required[str]
"""D1 database name."""

primary_location_hint: Literal["wnam", "enam", "weur", "eeur", "apac", "oc"]
"""Specify the region to create the D1 primary, if available.
Expand Down
2 changes: 2 additions & 0 deletions src/cloudflare/types/d1/database_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class DatabaseListResponse(BaseModel):
"""Specifies the timestamp the resource was created as an ISO8601 string."""

name: Optional[str] = None
"""D1 database name."""

uuid: Optional[str] = None
"""D1 database identifier (UUID)."""

version: Optional[str] = None