2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Dict , List , Union , Iterable , Optional
5
+ from typing import List , Union , Iterable , Optional
6
6
from typing_extensions import Literal , Required , TypeAlias , TypedDict
7
7
8
8
from .migration_step_param import MigrationStepParam
15
15
"MetadataAssets" ,
16
16
"MetadataAssetsConfig" ,
17
17
"MetadataBinding" ,
18
- "MetadataBindingWorkersBindingKindAny" ,
19
18
"MetadataBindingWorkersBindingKindAI" ,
20
19
"MetadataBindingWorkersBindingKindAnalyticsEngine" ,
21
20
"MetadataBindingWorkersBindingKindAssets" ,
24
23
"MetadataBindingWorkersBindingKindDispatchNamespace" ,
25
24
"MetadataBindingWorkersBindingKindDispatchNamespaceOutbound" ,
26
25
"MetadataBindingWorkersBindingKindDispatchNamespaceOutboundWorker" ,
27
- "MetadataBindingWorkersBindingKindDo " ,
26
+ "MetadataBindingWorkersBindingKindDurableObjectNamespace " ,
28
27
"MetadataBindingWorkersBindingKindHyperdrive" ,
29
28
"MetadataBindingWorkersBindingKindJson" ,
30
29
"MetadataBindingWorkersBindingKindKVNamespace" ,
31
- "MetadataBindingWorkersBindingKindMTLSCERT " ,
30
+ "MetadataBindingWorkersBindingKindMTLSCertificate " ,
32
31
"MetadataBindingWorkersBindingKindPlainText" ,
33
32
"MetadataBindingWorkersBindingKindQueue" ,
34
- "MetadataBindingWorkersBindingKindR2 " ,
35
- "MetadataBindingWorkersBindingKindSecret " ,
33
+ "MetadataBindingWorkersBindingKindR2Bucket " ,
34
+ "MetadataBindingWorkersBindingKindSecretText " ,
36
35
"MetadataBindingWorkersBindingKindService" ,
37
36
"MetadataBindingWorkersBindingKindTailConsumer" ,
38
37
"MetadataBindingWorkersBindingKindVectorize" ,
@@ -85,49 +84,38 @@ class MetadataAssets(TypedDict, total=False):
85
84
"""Token provided upon successful upload of all files from a registered manifest."""
86
85
87
86
88
- class MetadataBindingWorkersBindingKindAnyTyped (TypedDict , total = False ):
89
- name : Required [str ]
90
- """A JavaScript variable name for the binding."""
91
-
92
- type : Required [str ]
93
- """The kind of resource that the binding provides."""
94
-
95
-
96
- MetadataBindingWorkersBindingKindAny : TypeAlias = Union [MetadataBindingWorkersBindingKindAnyTyped , Dict [str , object ]]
97
-
98
-
99
87
class MetadataBindingWorkersBindingKindAI (TypedDict , total = False ):
100
88
name : Required [str ]
101
89
"""A JavaScript variable name for the binding."""
102
90
103
- type : Required [Literal [ "ai" ] ]
91
+ type : Required [str ]
104
92
"""The kind of resource that the binding provides."""
105
93
106
94
107
95
class MetadataBindingWorkersBindingKindAnalyticsEngine (TypedDict , total = False ):
108
96
dataset : Required [str ]
109
- """The dataset name to bind to."""
97
+ """The name of the dataset to bind to."""
110
98
111
99
name : Required [str ]
112
100
"""A JavaScript variable name for the binding."""
113
101
114
- type : Required [Literal [ "analytics_engine" ] ]
102
+ type : Required [str ]
115
103
"""The kind of resource that the binding provides."""
116
104
117
105
118
106
class MetadataBindingWorkersBindingKindAssets (TypedDict , total = False ):
119
107
name : Required [str ]
120
108
"""A JavaScript variable name for the binding."""
121
109
122
- type : Required [Literal [ "assets" ] ]
110
+ type : Required [str ]
123
111
"""The kind of resource that the binding provides."""
124
112
125
113
126
114
class MetadataBindingWorkersBindingKindBrowserRendering (TypedDict , total = False ):
127
115
name : Required [str ]
128
116
"""A JavaScript variable name for the binding."""
129
117
130
- type : Required [Literal [ "browser_rendering" ] ]
118
+ type : Required [str ]
131
119
"""The kind of resource that the binding provides."""
132
120
133
121
@@ -138,7 +126,7 @@ class MetadataBindingWorkersBindingKindD1(TypedDict, total=False):
138
126
name : Required [str ]
139
127
"""A JavaScript variable name for the binding."""
140
128
141
- type : Required [Literal [ "d1" ] ]
129
+ type : Required [str ]
142
130
"""The kind of resource that the binding provides."""
143
131
144
132
@@ -168,21 +156,21 @@ class MetadataBindingWorkersBindingKindDispatchNamespace(TypedDict, total=False)
168
156
namespace : Required [str ]
169
157
"""Namespace to bind to."""
170
158
171
- type : Required [Literal [ "dispatch_namespace" ] ]
159
+ type : Required [str ]
172
160
"""The kind of resource that the binding provides."""
173
161
174
162
outbound : MetadataBindingWorkersBindingKindDispatchNamespaceOutbound
175
163
"""Outbound worker."""
176
164
177
165
178
- class MetadataBindingWorkersBindingKindDo (TypedDict , total = False ):
166
+ class MetadataBindingWorkersBindingKindDurableObjectNamespace (TypedDict , total = False ):
179
167
class_name : Required [str ]
180
168
"""The exported class name of the Durable Object."""
181
169
182
170
name : Required [str ]
183
171
"""A JavaScript variable name for the binding."""
184
172
185
- type : Required [Literal [ "durable_object_namespace" ] ]
173
+ type : Required [str ]
186
174
"""The kind of resource that the binding provides."""
187
175
188
176
environment : str
@@ -205,7 +193,7 @@ class MetadataBindingWorkersBindingKindHyperdrive(TypedDict, total=False):
205
193
name : Required [str ]
206
194
"""A JavaScript variable name for the binding."""
207
195
208
- type : Required [Literal [ "hyperdrive" ] ]
196
+ type : Required [str ]
209
197
"""The kind of resource that the binding provides."""
210
198
211
199
@@ -216,7 +204,7 @@ class MetadataBindingWorkersBindingKindJson(TypedDict, total=False):
216
204
name : Required [str ]
217
205
"""A JavaScript variable name for the binding."""
218
206
219
- type : Required [Literal [ "json" ] ]
207
+ type : Required [str ]
220
208
"""The kind of resource that the binding provides."""
221
209
222
210
@@ -227,18 +215,18 @@ class MetadataBindingWorkersBindingKindKVNamespace(TypedDict, total=False):
227
215
namespace_id : Required [str ]
228
216
"""Namespace identifier tag."""
229
217
230
- type : Required [Literal [ "kv_namespace" ] ]
218
+ type : Required [str ]
231
219
"""The kind of resource that the binding provides."""
232
220
233
221
234
- class MetadataBindingWorkersBindingKindMTLSCERT (TypedDict , total = False ):
222
+ class MetadataBindingWorkersBindingKindMTLSCertificate (TypedDict , total = False ):
235
223
certificate_id : Required [str ]
236
224
"""Identifier of the certificate to bind to."""
237
225
238
226
name : Required [str ]
239
227
"""A JavaScript variable name for the binding."""
240
228
241
- type : Required [Literal [ "mtls_certificate" ] ]
229
+ type : Required [str ]
242
230
"""The kind of resource that the binding provides."""
243
231
244
232
@@ -249,7 +237,7 @@ class MetadataBindingWorkersBindingKindPlainText(TypedDict, total=False):
249
237
text : Required [str ]
250
238
"""The text value to use."""
251
239
252
- type : Required [Literal [ "plain_text" ] ]
240
+ type : Required [str ]
253
241
"""The kind of resource that the binding provides."""
254
242
255
243
@@ -260,29 +248,29 @@ class MetadataBindingWorkersBindingKindQueue(TypedDict, total=False):
260
248
queue_name : Required [str ]
261
249
"""Name of the Queue to bind to."""
262
250
263
- type : Required [Literal [ "queue" ] ]
251
+ type : Required [str ]
264
252
"""The kind of resource that the binding provides."""
265
253
266
254
267
- class MetadataBindingWorkersBindingKindR2 (TypedDict , total = False ):
255
+ class MetadataBindingWorkersBindingKindR2Bucket (TypedDict , total = False ):
268
256
bucket_name : Required [str ]
269
257
"""R2 bucket to bind to."""
270
258
271
259
name : Required [str ]
272
260
"""A JavaScript variable name for the binding."""
273
261
274
- type : Required [Literal [ "r2_bucket" ] ]
262
+ type : Required [str ]
275
263
"""The kind of resource that the binding provides."""
276
264
277
265
278
- class MetadataBindingWorkersBindingKindSecret (TypedDict , total = False ):
266
+ class MetadataBindingWorkersBindingKindSecretText (TypedDict , total = False ):
279
267
name : Required [str ]
280
268
"""A JavaScript variable name for the binding."""
281
269
282
270
text : Required [str ]
283
271
"""The secret value to use."""
284
272
285
- type : Required [Literal [ "secret_text" ] ]
273
+ type : Required [str ]
286
274
"""The kind of resource that the binding provides."""
287
275
288
276
@@ -296,7 +284,7 @@ class MetadataBindingWorkersBindingKindService(TypedDict, total=False):
296
284
service : Required [str ]
297
285
"""Name of Worker to bind to."""
298
286
299
- type : Required [Literal [ "service" ] ]
287
+ type : Required [str ]
300
288
"""The kind of resource that the binding provides."""
301
289
302
290
@@ -307,7 +295,7 @@ class MetadataBindingWorkersBindingKindTailConsumer(TypedDict, total=False):
307
295
service : Required [str ]
308
296
"""Name of Tail Worker to bind to."""
309
297
310
- type : Required [Literal [ "tail_consumer" ] ]
298
+ type : Required [str ]
311
299
"""The kind of resource that the binding provides."""
312
300
313
301
@@ -318,35 +306,34 @@ class MetadataBindingWorkersBindingKindVectorize(TypedDict, total=False):
318
306
name : Required [str ]
319
307
"""A JavaScript variable name for the binding."""
320
308
321
- type : Required [Literal [ "vectorize" ] ]
309
+ type : Required [str ]
322
310
"""The kind of resource that the binding provides."""
323
311
324
312
325
313
class MetadataBindingWorkersBindingKindVersionMetadata (TypedDict , total = False ):
326
314
name : Required [str ]
327
315
"""A JavaScript variable name for the binding."""
328
316
329
- type : Required [Literal [ "version_metadata" ] ]
317
+ type : Required [str ]
330
318
"""The kind of resource that the binding provides."""
331
319
332
320
333
321
MetadataBinding : TypeAlias = Union [
334
- MetadataBindingWorkersBindingKindAny ,
335
322
MetadataBindingWorkersBindingKindAI ,
336
323
MetadataBindingWorkersBindingKindAnalyticsEngine ,
337
324
MetadataBindingWorkersBindingKindAssets ,
338
325
MetadataBindingWorkersBindingKindBrowserRendering ,
339
326
MetadataBindingWorkersBindingKindD1 ,
340
327
MetadataBindingWorkersBindingKindDispatchNamespace ,
341
- MetadataBindingWorkersBindingKindDo ,
328
+ MetadataBindingWorkersBindingKindDurableObjectNamespace ,
342
329
MetadataBindingWorkersBindingKindHyperdrive ,
343
330
MetadataBindingWorkersBindingKindJson ,
344
331
MetadataBindingWorkersBindingKindKVNamespace ,
345
- MetadataBindingWorkersBindingKindMTLSCERT ,
332
+ MetadataBindingWorkersBindingKindMTLSCertificate ,
346
333
MetadataBindingWorkersBindingKindPlainText ,
347
334
MetadataBindingWorkersBindingKindQueue ,
348
- MetadataBindingWorkersBindingKindR2 ,
349
- MetadataBindingWorkersBindingKindSecret ,
335
+ MetadataBindingWorkersBindingKindR2Bucket ,
336
+ MetadataBindingWorkersBindingKindSecretText ,
350
337
MetadataBindingWorkersBindingKindService ,
351
338
MetadataBindingWorkersBindingKindTailConsumer ,
352
339
MetadataBindingWorkersBindingKindVectorize ,
0 commit comments