Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 151a44a

Browse files
committedMar 12, 2025·
feat(api): api update (#2520)
1 parent cde2fcd commit 151a44a

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1607
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-637cb50ea85a989343bcadc2b0ac07b2b0158c3b4a982109b914bbaa0d2b1a5f.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97f2caa78013422a7ebb30d24030d94cc48c71c090a645cf118ff61b10f605d0.yml

‎src/cloudflare/types/zaraz/config_update_params.py

+18-9
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@
4747
"TriggersLoadRuleZarazElementVisibilityRule",
4848
"TriggersLoadRuleZarazElementVisibilityRuleSettings",
4949
"Variables",
50-
"VariablesUnionMember0",
51-
"VariablesUnionMember1",
52-
"VariablesUnionMember1Value",
50+
"VariablesZarazStringVariable",
51+
"VariablesZarazSecretVariable",
52+
"VariablesZarazWorkerVariable",
53+
"VariablesZarazWorkerVariableValue",
5354
"Analytics",
5455
"Consent",
5556
"ConsentPurposes",
@@ -512,29 +513,37 @@ class Triggers(TypedDict, total=False):
512513
system: Literal["pageload"]
513514

514515

515-
class VariablesUnionMember0(TypedDict, total=False):
516+
class VariablesZarazStringVariable(TypedDict, total=False):
516517
name: Required[str]
517518

518-
type: Required[Literal["string", "secret"]]
519+
type: Required[Literal["string"]]
519520

520521
value: Required[str]
521522

522523

523-
class VariablesUnionMember1Value(TypedDict, total=False):
524+
class VariablesZarazSecretVariable(TypedDict, total=False):
525+
name: Required[str]
526+
527+
type: Required[Literal["secret"]]
528+
529+
value: Required[str]
530+
531+
532+
class VariablesZarazWorkerVariableValue(TypedDict, total=False):
524533
escaped_worker_name: Required[Annotated[str, PropertyInfo(alias="escapedWorkerName")]]
525534

526535
worker_tag: Required[Annotated[str, PropertyInfo(alias="workerTag")]]
527536

528537

529-
class VariablesUnionMember1(TypedDict, total=False):
538+
class VariablesZarazWorkerVariable(TypedDict, total=False):
530539
name: Required[str]
531540

532541
type: Required[Literal["worker"]]
533542

534-
value: Required[VariablesUnionMember1Value]
543+
value: Required[VariablesZarazWorkerVariableValue]
535544

536545

537-
Variables: TypeAlias = Union[VariablesUnionMember0, VariablesUnionMember1]
546+
Variables: TypeAlias = Union[VariablesZarazStringVariable, VariablesZarazSecretVariable, VariablesZarazWorkerVariable]
538547

539548

540549
class Analytics(TypedDict, total=False):

‎src/cloudflare/types/zaraz/configuration.py

+23-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Dict, List, Union, Optional
4-
from typing_extensions import Literal, TypeAlias
4+
from typing_extensions import Literal, Annotated, TypeAlias
55

66
from pydantic import Field as FieldInfo
77

8+
from ..._utils import PropertyInfo
89
from ..._models import BaseModel
910
from .neo_event import NeoEvent
1011
from .button_text_translation import ButtonTextTranslation
@@ -47,9 +48,10 @@
4748
"TriggersLoadRuleZarazElementVisibilityRule",
4849
"TriggersLoadRuleZarazElementVisibilityRuleSettings",
4950
"Variables",
50-
"VariablesUnionMember0",
51-
"VariablesUnionMember1",
52-
"VariablesUnionMember1Value",
51+
"VariablesZarazStringVariable",
52+
"VariablesZarazSecretVariable",
53+
"VariablesZarazWorkerVariable",
54+
"VariablesZarazWorkerVariableValue",
5355
"Analytics",
5456
"Consent",
5557
"ConsentPurposes",
@@ -463,29 +465,40 @@ class Triggers(BaseModel):
463465
system: Optional[Literal["pageload"]] = None
464466

465467

466-
class VariablesUnionMember0(BaseModel):
468+
class VariablesZarazStringVariable(BaseModel):
467469
name: str
468470

469-
type: Literal["string", "secret"]
471+
type: Literal["string"]
470472

471473
value: str
472474

473475

474-
class VariablesUnionMember1Value(BaseModel):
476+
class VariablesZarazSecretVariable(BaseModel):
477+
name: str
478+
479+
type: Literal["secret"]
480+
481+
value: str
482+
483+
484+
class VariablesZarazWorkerVariableValue(BaseModel):
475485
escaped_worker_name: str = FieldInfo(alias="escapedWorkerName")
476486

477487
worker_tag: str = FieldInfo(alias="workerTag")
478488

479489

480-
class VariablesUnionMember1(BaseModel):
490+
class VariablesZarazWorkerVariable(BaseModel):
481491
name: str
482492

483493
type: Literal["worker"]
484494

485-
value: VariablesUnionMember1Value
495+
value: VariablesZarazWorkerVariableValue
486496

487497

488-
Variables: TypeAlias = Union[VariablesUnionMember0, VariablesUnionMember1]
498+
Variables: TypeAlias = Annotated[
499+
Union[VariablesZarazStringVariable, VariablesZarazSecretVariable, VariablesZarazWorkerVariable],
500+
PropertyInfo(discriminator="type"),
501+
]
489502

490503

491504
class Analytics(BaseModel):

0 commit comments

Comments
 (0)
Please sign in to comment.