16
16
"ScriptUpdateParams" ,
17
17
"Variant0" ,
18
18
"Variant0Metadata" ,
19
+ "Variant0MetadataAssets" ,
20
+ "Variant0MetadataAssetsConfig" ,
19
21
"Variant0MetadataBinding" ,
20
22
"Variant0MetadataMigrations" ,
21
23
"Variant0MetadataObservability" ,
@@ -48,6 +50,25 @@ class Variant0(TypedDict, total=False):
48
50
"""JSON encoded metadata about the uploaded parts and Worker configuration."""
49
51
50
52
53
+ class Variant0MetadataAssetsConfig (TypedDict , total = False ):
54
+ html_handling : Literal ["auto-trailing-slash" , "force-trailing-slash" , "drop-trailing-slash" , "none" ]
55
+ """Determines the redirects and rewrites of requests for HTML content."""
56
+
57
+ not_found_handling : Literal ["none" , "404-page" , "single-page-application" ]
58
+ """
59
+ Determines the response when a request does not match a static asset, and there
60
+ is no Worker script.
61
+ """
62
+
63
+
64
+ class Variant0MetadataAssets (TypedDict , total = False ):
65
+ config : Variant0MetadataAssetsConfig
66
+ """Configuration for assets within a Worker."""
67
+
68
+ jwt : str
69
+ """Token provided upon successful upload of all files from a registered manifest."""
70
+
71
+
51
72
class Variant0MetadataBindingTyped (TypedDict , total = False ):
52
73
name : str
53
74
"""Name of the binding variable."""
@@ -67,7 +88,7 @@ class Variant0MetadataBindingTyped(TypedDict, total=False):
67
88
68
89
class Variant0MetadataObservability (TypedDict , total = False ):
69
90
enabled : Required [bool ]
70
- """Whether observability is enabled for the Worker"""
91
+ """Whether observability is enabled for the Worker. """
71
92
72
93
head_sampling_rate : Optional [float ]
73
94
"""The sampling rate for incoming requests.
@@ -77,6 +98,9 @@ class Variant0MetadataObservability(TypedDict, total=False):
77
98
78
99
79
100
class Variant0Metadata (TypedDict , total = False ):
101
+ assets : Variant0MetadataAssets
102
+ """Configuration for assets within a Worker"""
103
+
80
104
bindings : Iterable [Variant0MetadataBinding ]
81
105
"""List of bindings available to the worker."""
82
106
@@ -101,6 +125,12 @@ class Variant0Metadata(TypedDict, total=False):
101
125
included in a `compatibility_date`.
102
126
"""
103
127
128
+ keep_assets : bool
129
+ """
130
+ Retain assets which exist for a previously uploaded Worker version; used in lieu
131
+ of providing a completion token.
132
+ """
133
+
104
134
keep_bindings : List [str ]
105
135
"""List of binding types to keep from previous_upload."""
106
136
@@ -117,12 +147,12 @@ class Variant0Metadata(TypedDict, total=False):
117
147
"""Migrations to apply for Durable Objects associated with this Worker."""
118
148
119
149
observability : Variant0MetadataObservability
120
- """Observability settings for the Worker"""
150
+ """Observability settings for the Worker. """
121
151
122
152
placement : PlacementConfigurationParam
123
153
124
154
tags : List [str ]
125
- """List of strings to use as tags for this Worker"""
155
+ """List of strings to use as tags for this Worker. """
126
156
127
157
tail_consumers : Iterable [ConsumerScriptParam ]
128
158
"""List of Workers that will consume logs from the attached Worker."""
@@ -131,7 +161,7 @@ class Variant0Metadata(TypedDict, total=False):
131
161
"""Usage model to apply to invocations."""
132
162
133
163
version_tags : Dict [str , str ]
134
- """Key-value pairs to use as tags for this version of this Worker"""
164
+ """Key-value pairs to use as tags for this version of this Worker. """
135
165
136
166
137
167
class Variant1 (TypedDict , total = False ):
0 commit comments