Skip to content

feat(api): api update #2476

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

Merged
merged 1 commit into from
Feb 25, 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: 1542
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04a45bd421e28ee706da1feab38ccbaf3f29822e3331d713d9097d7cc855a07b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ab77157d91e6056139f11e1b8ff2d7aba23176ae44a15aa49f9c8546b18caf2c.yml
79 changes: 33 additions & 46 deletions src/cloudflare/types/workers/script_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, List, Union, Iterable, Optional
from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from .migration_step_param import MigrationStepParam
Expand All @@ -15,7 +15,6 @@
"MetadataAssets",
"MetadataAssetsConfig",
"MetadataBinding",
"MetadataBindingWorkersBindingKindAny",
"MetadataBindingWorkersBindingKindAI",
"MetadataBindingWorkersBindingKindAnalyticsEngine",
"MetadataBindingWorkersBindingKindAssets",
Expand All @@ -24,15 +23,15 @@
"MetadataBindingWorkersBindingKindDispatchNamespace",
"MetadataBindingWorkersBindingKindDispatchNamespaceOutbound",
"MetadataBindingWorkersBindingKindDispatchNamespaceOutboundWorker",
"MetadataBindingWorkersBindingKindDo",
"MetadataBindingWorkersBindingKindDurableObjectNamespace",
"MetadataBindingWorkersBindingKindHyperdrive",
"MetadataBindingWorkersBindingKindJson",
"MetadataBindingWorkersBindingKindKVNamespace",
"MetadataBindingWorkersBindingKindMTLSCERT",
"MetadataBindingWorkersBindingKindMTLSCertificate",
"MetadataBindingWorkersBindingKindPlainText",
"MetadataBindingWorkersBindingKindQueue",
"MetadataBindingWorkersBindingKindR2",
"MetadataBindingWorkersBindingKindSecret",
"MetadataBindingWorkersBindingKindR2Bucket",
"MetadataBindingWorkersBindingKindSecretText",
"MetadataBindingWorkersBindingKindService",
"MetadataBindingWorkersBindingKindTailConsumer",
"MetadataBindingWorkersBindingKindVectorize",
Expand Down Expand Up @@ -85,49 +84,38 @@ class MetadataAssets(TypedDict, total=False):
"""Token provided upon successful upload of all files from a registered manifest."""


class MetadataBindingWorkersBindingKindAnyTyped(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[str]
"""The kind of resource that the binding provides."""


MetadataBindingWorkersBindingKindAny: TypeAlias = Union[MetadataBindingWorkersBindingKindAnyTyped, Dict[str, object]]


class MetadataBindingWorkersBindingKindAI(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["ai"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindAnalyticsEngine(TypedDict, total=False):
dataset: Required[str]
"""The dataset name to bind to."""
"""The name of the dataset to bind to."""

name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["analytics_engine"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindAssets(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["assets"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindBrowserRendering(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["browser_rendering"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -138,7 +126,7 @@ class MetadataBindingWorkersBindingKindD1(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["d1"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand Down Expand Up @@ -168,21 +156,21 @@ class MetadataBindingWorkersBindingKindDispatchNamespace(TypedDict, total=False)
namespace: Required[str]
"""Namespace to bind to."""

type: Required[Literal["dispatch_namespace"]]
type: Required[str]
"""The kind of resource that the binding provides."""

outbound: MetadataBindingWorkersBindingKindDispatchNamespaceOutbound
"""Outbound worker."""


class MetadataBindingWorkersBindingKindDo(TypedDict, total=False):
class MetadataBindingWorkersBindingKindDurableObjectNamespace(TypedDict, total=False):
class_name: Required[str]
"""The exported class name of the Durable Object."""

name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["durable_object_namespace"]]
type: Required[str]
"""The kind of resource that the binding provides."""

environment: str
Expand All @@ -205,7 +193,7 @@ class MetadataBindingWorkersBindingKindHyperdrive(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["hyperdrive"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -216,7 +204,7 @@ class MetadataBindingWorkersBindingKindJson(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["json"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -227,18 +215,18 @@ class MetadataBindingWorkersBindingKindKVNamespace(TypedDict, total=False):
namespace_id: Required[str]
"""Namespace identifier tag."""

type: Required[Literal["kv_namespace"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindMTLSCERT(TypedDict, total=False):
class MetadataBindingWorkersBindingKindMTLSCertificate(TypedDict, total=False):
certificate_id: Required[str]
"""Identifier of the certificate to bind to."""

name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["mtls_certificate"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -249,7 +237,7 @@ class MetadataBindingWorkersBindingKindPlainText(TypedDict, total=False):
text: Required[str]
"""The text value to use."""

type: Required[Literal["plain_text"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -260,29 +248,29 @@ class MetadataBindingWorkersBindingKindQueue(TypedDict, total=False):
queue_name: Required[str]
"""Name of the Queue to bind to."""

type: Required[Literal["queue"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindR2(TypedDict, total=False):
class MetadataBindingWorkersBindingKindR2Bucket(TypedDict, total=False):
bucket_name: Required[str]
"""R2 bucket to bind to."""

name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["r2_bucket"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindSecret(TypedDict, total=False):
class MetadataBindingWorkersBindingKindSecretText(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

text: Required[str]
"""The secret value to use."""

type: Required[Literal["secret_text"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -296,7 +284,7 @@ class MetadataBindingWorkersBindingKindService(TypedDict, total=False):
service: Required[str]
"""Name of Worker to bind to."""

type: Required[Literal["service"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -307,7 +295,7 @@ class MetadataBindingWorkersBindingKindTailConsumer(TypedDict, total=False):
service: Required[str]
"""Name of Tail Worker to bind to."""

type: Required[Literal["tail_consumer"]]
type: Required[str]
"""The kind of resource that the binding provides."""


Expand All @@ -318,35 +306,34 @@ class MetadataBindingWorkersBindingKindVectorize(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["vectorize"]]
type: Required[str]
"""The kind of resource that the binding provides."""


class MetadataBindingWorkersBindingKindVersionMetadata(TypedDict, total=False):
name: Required[str]
"""A JavaScript variable name for the binding."""

type: Required[Literal["version_metadata"]]
type: Required[str]
"""The kind of resource that the binding provides."""


MetadataBinding: TypeAlias = Union[
MetadataBindingWorkersBindingKindAny,
MetadataBindingWorkersBindingKindAI,
MetadataBindingWorkersBindingKindAnalyticsEngine,
MetadataBindingWorkersBindingKindAssets,
MetadataBindingWorkersBindingKindBrowserRendering,
MetadataBindingWorkersBindingKindD1,
MetadataBindingWorkersBindingKindDispatchNamespace,
MetadataBindingWorkersBindingKindDo,
MetadataBindingWorkersBindingKindDurableObjectNamespace,
MetadataBindingWorkersBindingKindHyperdrive,
MetadataBindingWorkersBindingKindJson,
MetadataBindingWorkersBindingKindKVNamespace,
MetadataBindingWorkersBindingKindMTLSCERT,
MetadataBindingWorkersBindingKindMTLSCertificate,
MetadataBindingWorkersBindingKindPlainText,
MetadataBindingWorkersBindingKindQueue,
MetadataBindingWorkersBindingKindR2,
MetadataBindingWorkersBindingKindSecret,
MetadataBindingWorkersBindingKindR2Bucket,
MetadataBindingWorkersBindingKindSecretText,
MetadataBindingWorkersBindingKindService,
MetadataBindingWorkersBindingKindTailConsumer,
MetadataBindingWorkersBindingKindVectorize,
Expand Down
Loading