@distilled.cloud/cloudflare 0.30.1 → 0.30.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -332,13 +332,12 @@ interface ListBetaWorkersResponseResult {
332
332
  /** Name of the referencing Worker. */
333
333
  name: string;
334
334
  }
335
- const ListBetaWorkersResponseResult =
336
- /*@__PURE__*/ Schema.suspend(() =>
337
- Schema.Struct({
338
- id: Schema.String,
339
- name: Schema.String,
340
- }),
341
- ) as unknown as Schema.Codec<ListBetaWorkersResponseResult>;
335
+ const ListBetaWorkersResponseResult = /*@__PURE__*/ Schema.suspend(() =>
336
+ Schema.Struct({
337
+ id: Schema.String,
338
+ name: Schema.String,
339
+ }),
340
+ ) as unknown as Schema.Codec<ListBetaWorkersResponseResult>;
342
341
 
343
342
  interface ListBetaWorkersResponseResultInfo {
344
343
  count?: number | null;
@@ -346,22 +345,21 @@ interface ListBetaWorkersResponseResultInfo {
346
345
  perPage?: number | null;
347
346
  totalCount?: number | null;
348
347
  }
349
- const ListBetaWorkersResponseResultInfo =
350
- /*@__PURE__*/ Schema.suspend(() =>
351
- Schema.Struct({
352
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
353
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
354
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
355
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
356
- }).pipe(
357
- Schema.encodeKeys({
358
- count: "count",
359
- page: "page",
360
- perPage: "per_page",
361
- totalCount: "total_count",
362
- }),
363
- ),
364
- ) as unknown as Schema.Codec<ListBetaWorkersResponseResultInfo>;
348
+ const ListBetaWorkersResponseResultInfo = /*@__PURE__*/ Schema.suspend(() =>
349
+ Schema.Struct({
350
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
351
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
352
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
353
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
354
+ }).pipe(
355
+ Schema.encodeKeys({
356
+ count: "count",
357
+ page: "page",
358
+ perPage: "per_page",
359
+ totalCount: "total_count",
360
+ }),
361
+ ),
362
+ ) as unknown as Schema.Codec<ListBetaWorkersResponseResultInfo>;
365
363
 
366
364
  interface Logs {
367
365
  /** A list of destinations where logs will be exported to. */
@@ -702,14 +700,13 @@ interface WorkersBindingKindAISearchNamespace {
702
700
  /** The kind of resource that the binding provides. */
703
701
  type: "ai_search_namespace";
704
702
  }
705
- const WorkersBindingKindAISearchNamespace =
706
- /*@__PURE__*/ Schema.suspend(() =>
707
- Schema.Struct({
708
- name: Schema.String,
709
- namespace: Schema.String,
710
- type: Schema.Literal("ai_search_namespace"),
711
- }),
712
- ) as unknown as Schema.Codec<WorkersBindingKindAISearchNamespace>;
703
+ const WorkersBindingKindAISearchNamespace = /*@__PURE__*/ Schema.suspend(() =>
704
+ Schema.Struct({
705
+ name: Schema.String,
706
+ namespace: Schema.String,
707
+ type: Schema.Literal("ai_search_namespace"),
708
+ }),
709
+ ) as unknown as Schema.Codec<WorkersBindingKindAISearchNamespace>;
713
710
 
714
711
  interface WorkersBindingKindAnalyticsEngine {
715
712
  /** The name of the dataset to bind to. */
@@ -719,14 +716,13 @@ interface WorkersBindingKindAnalyticsEngine {
719
716
  /** The kind of resource that the binding provides. */
720
717
  type: "analytics_engine";
721
718
  }
722
- const WorkersBindingKindAnalyticsEngine =
723
- /*@__PURE__*/ Schema.suspend(() =>
724
- Schema.Struct({
725
- dataset: Schema.String,
726
- name: Schema.String,
727
- type: Schema.Literal("analytics_engine"),
728
- }),
729
- ) as unknown as Schema.Codec<WorkersBindingKindAnalyticsEngine>;
719
+ const WorkersBindingKindAnalyticsEngine = /*@__PURE__*/ Schema.suspend(() =>
720
+ Schema.Struct({
721
+ dataset: Schema.String,
722
+ name: Schema.String,
723
+ type: Schema.Literal("analytics_engine"),
724
+ }),
725
+ ) as unknown as Schema.Codec<WorkersBindingKindAnalyticsEngine>;
730
726
 
731
727
  interface WorkersBindingKindAssets {
732
728
  /** A JavaScript variable name for the binding. */
@@ -848,15 +844,14 @@ interface WorkersBindingKindDispatchNamespace {
848
844
  } | null;
849
845
  } | null;
850
846
  }
851
- const WorkersBindingKindDispatchNamespace =
852
- /*@__PURE__*/ Schema.suspend(() =>
853
- Schema.Struct({
854
- name: Schema.String,
855
- namespace: Schema.String,
856
- type: Schema.Literal("dispatch_namespace"),
857
- outbound: Schema.optional(Schema.Union([Outbound, Schema.Null])),
858
- }),
859
- ) as unknown as Schema.Codec<WorkersBindingKindDispatchNamespace>;
847
+ const WorkersBindingKindDispatchNamespace = /*@__PURE__*/ Schema.suspend(() =>
848
+ Schema.Struct({
849
+ name: Schema.String,
850
+ namespace: Schema.String,
851
+ type: Schema.Literal("dispatch_namespace"),
852
+ outbound: Schema.optional(Schema.Union([Outbound, Schema.Null])),
853
+ }),
854
+ ) as unknown as Schema.Codec<WorkersBindingKindDispatchNamespace>;
860
855
 
861
856
  interface WorkersBindingKindDurableObjectNamespace {
862
857
  /** A JavaScript variable name for the binding. */
@@ -874,8 +869,8 @@ interface WorkersBindingKindDurableObjectNamespace {
874
869
  /** The script where the Durable Object is defined, if it is external to this Worker. */
875
870
  scriptName?: string | null;
876
871
  }
877
- const WorkersBindingKindDurableObjectNamespace =
878
- /*@__PURE__*/ Schema.suspend(() =>
872
+ const WorkersBindingKindDurableObjectNamespace = /*@__PURE__*/ Schema.suspend(
873
+ () =>
879
874
  Schema.Struct({
880
875
  name: Schema.String,
881
876
  type: Schema.Literal("durable_object_namespace"),
@@ -897,7 +892,7 @@ const WorkersBindingKindDurableObjectNamespace =
897
892
  scriptName: "script_name",
898
893
  }),
899
894
  ),
900
- ) as unknown as Schema.Codec<WorkersBindingKindDurableObjectNamespace>;
895
+ ) as unknown as Schema.Codec<WorkersBindingKindDurableObjectNamespace>;
901
896
 
902
897
  interface WorkersBindingKindHyperdrive {
903
898
  /** Identifier of the Hyperdrive connection to bind to. */
@@ -978,20 +973,19 @@ interface WorkersBindingKindKVNamespace {
978
973
  /** The kind of resource that the binding provides. */
979
974
  type: "kv_namespace";
980
975
  }
981
- const WorkersBindingKindKVNamespace =
982
- /*@__PURE__*/ Schema.suspend(() =>
983
- Schema.Struct({
984
- name: Schema.String,
985
- namespaceId: Schema.String,
986
- type: Schema.Literal("kv_namespace"),
987
- }).pipe(
988
- Schema.encodeKeys({
989
- name: "name",
990
- namespaceId: "namespace_id",
991
- type: "type",
992
- }),
993
- ),
994
- ) as unknown as Schema.Codec<WorkersBindingKindKVNamespace>;
976
+ const WorkersBindingKindKVNamespace = /*@__PURE__*/ Schema.suspend(() =>
977
+ Schema.Struct({
978
+ name: Schema.String,
979
+ namespaceId: Schema.String,
980
+ type: Schema.Literal("kv_namespace"),
981
+ }).pipe(
982
+ Schema.encodeKeys({
983
+ name: "name",
984
+ namespaceId: "namespace_id",
985
+ type: "type",
986
+ }),
987
+ ),
988
+ ) as unknown as Schema.Codec<WorkersBindingKindKVNamespace>;
995
989
 
996
990
  interface WorkersBindingKindMedia {
997
991
  /** A JavaScript variable name for the binding. */
@@ -1014,20 +1008,19 @@ interface WorkersBindingKindMTLSCertificate {
1014
1008
  /** The kind of resource that the binding provides. */
1015
1009
  type: "mtls_certificate";
1016
1010
  }
1017
- const WorkersBindingKindMTLSCertificate =
1018
- /*@__PURE__*/ Schema.suspend(() =>
1019
- Schema.Struct({
1020
- certificateId: Schema.String,
1021
- name: Schema.String,
1022
- type: Schema.Literal("mtls_certificate"),
1023
- }).pipe(
1024
- Schema.encodeKeys({
1025
- certificateId: "certificate_id",
1026
- name: "name",
1027
- type: "type",
1028
- }),
1029
- ),
1030
- ) as unknown as Schema.Codec<WorkersBindingKindMTLSCertificate>;
1011
+ const WorkersBindingKindMTLSCertificate = /*@__PURE__*/ Schema.suspend(() =>
1012
+ Schema.Struct({
1013
+ certificateId: Schema.String,
1014
+ name: Schema.String,
1015
+ type: Schema.Literal("mtls_certificate"),
1016
+ }).pipe(
1017
+ Schema.encodeKeys({
1018
+ certificateId: "certificate_id",
1019
+ name: "name",
1020
+ type: "type",
1021
+ }),
1022
+ ),
1023
+ ) as unknown as Schema.Codec<WorkersBindingKindMTLSCertificate>;
1031
1024
 
1032
1025
  interface WorkersBindingKindPlainText {
1033
1026
  /** A JavaScript variable name for the binding. */
@@ -1264,11 +1257,7 @@ const WorkersBindingKindVectorize = /*@__PURE__*/ Schema.suspend(() =>
1264
1257
  name: Schema.String,
1265
1258
  type: Schema.Literal("vectorize"),
1266
1259
  }).pipe(
1267
- Schema.encodeKeys({
1268
- indexName: "index_name",
1269
- name: "name",
1270
- type: "type",
1271
- }),
1260
+ Schema.encodeKeys({ indexName: "index_name", name: "name", type: "type" }),
1272
1261
  ),
1273
1262
  ) as unknown as Schema.Codec<WorkersBindingKindVectorize>;
1274
1263
 
@@ -1278,13 +1267,12 @@ interface WorkersBindingKindVersionMetadata {
1278
1267
  /** The kind of resource that the binding provides. */
1279
1268
  type: "version_metadata";
1280
1269
  }
1281
- const WorkersBindingKindVersionMetadata =
1282
- /*@__PURE__*/ Schema.suspend(() =>
1283
- Schema.Struct({
1284
- name: Schema.String,
1285
- type: Schema.Literal("version_metadata"),
1286
- }),
1287
- ) as unknown as Schema.Codec<WorkersBindingKindVersionMetadata>;
1270
+ const WorkersBindingKindVersionMetadata = /*@__PURE__*/ Schema.suspend(() =>
1271
+ Schema.Struct({
1272
+ name: Schema.String,
1273
+ type: Schema.Literal("version_metadata"),
1274
+ }),
1275
+ ) as unknown as Schema.Codec<WorkersBindingKindVersionMetadata>;
1288
1276
 
1289
1277
  interface WorkersBindingKindSecretsStoreSecret {
1290
1278
  /** A JavaScript variable name for the binding. */
@@ -1296,22 +1284,21 @@ interface WorkersBindingKindSecretsStoreSecret {
1296
1284
  /** The kind of resource that the binding provides. */
1297
1285
  type: "secrets_store_secret";
1298
1286
  }
1299
- const WorkersBindingKindSecretsStoreSecret =
1300
- /*@__PURE__*/ Schema.suspend(() =>
1301
- Schema.Struct({
1302
- name: Schema.String,
1303
- secretName: Schema.String,
1304
- storeId: Schema.String,
1305
- type: Schema.Literal("secrets_store_secret"),
1306
- }).pipe(
1307
- Schema.encodeKeys({
1308
- name: "name",
1309
- secretName: "secret_name",
1310
- storeId: "store_id",
1311
- type: "type",
1312
- }),
1313
- ),
1314
- ) as unknown as Schema.Codec<WorkersBindingKindSecretsStoreSecret>;
1287
+ const WorkersBindingKindSecretsStoreSecret = /*@__PURE__*/ Schema.suspend(() =>
1288
+ Schema.Struct({
1289
+ name: Schema.String,
1290
+ secretName: Schema.String,
1291
+ storeId: Schema.String,
1292
+ type: Schema.Literal("secrets_store_secret"),
1293
+ }).pipe(
1294
+ Schema.encodeKeys({
1295
+ name: "name",
1296
+ secretName: "secret_name",
1297
+ storeId: "store_id",
1298
+ type: "type",
1299
+ }),
1300
+ ),
1301
+ ) as unknown as Schema.Codec<WorkersBindingKindSecretsStoreSecret>;
1315
1302
 
1316
1303
  interface WorkersBindingKindFlagship {
1317
1304
  /** ID of the Flagship app to bind to for feature flag evaluation. */
@@ -1438,11 +1425,7 @@ const WorkersBindingKindVPCService = /*@__PURE__*/ Schema.suspend(() =>
1438
1425
  serviceId: Schema.String,
1439
1426
  type: Schema.Literal("vpc_service"),
1440
1427
  }).pipe(
1441
- Schema.encodeKeys({
1442
- name: "name",
1443
- serviceId: "service_id",
1444
- type: "type",
1445
- }),
1428
+ Schema.encodeKeys({ name: "name", serviceId: "service_id", type: "type" }),
1446
1429
  ),
1447
1430
  ) as unknown as Schema.Codec<WorkersBindingKindVPCService>;
1448
1431
 
@@ -1476,27 +1459,25 @@ interface GetBetaWorkerVersionResponseBinding35 {
1476
1459
  name: string;
1477
1460
  type: "worker_loader";
1478
1461
  }
1479
- const GetBetaWorkerVersionResponseBinding35 =
1480
- /*@__PURE__*/ Schema.suspend(() =>
1481
- Schema.Struct({
1482
- name: Schema.String,
1483
- type: Schema.Literal("worker_loader"),
1484
- }),
1485
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponseBinding35>;
1462
+ const GetBetaWorkerVersionResponseBinding35 = /*@__PURE__*/ Schema.suspend(() =>
1463
+ Schema.Struct({
1464
+ name: Schema.String,
1465
+ type: Schema.Literal("worker_loader"),
1466
+ }),
1467
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponseBinding35>;
1486
1468
 
1487
1469
  interface GetBetaWorkerVersionResponseBinding36 {
1488
1470
  name: string;
1489
1471
  type: "artifacts";
1490
1472
  namespace: string;
1491
1473
  }
1492
- const GetBetaWorkerVersionResponseBinding36 =
1493
- /*@__PURE__*/ Schema.suspend(() =>
1494
- Schema.Struct({
1495
- name: Schema.String,
1496
- type: Schema.Literal("artifacts"),
1497
- namespace: Schema.String,
1498
- }),
1499
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponseBinding36>;
1474
+ const GetBetaWorkerVersionResponseBinding36 = /*@__PURE__*/ Schema.suspend(() =>
1475
+ Schema.Struct({
1476
+ name: Schema.String,
1477
+ type: Schema.Literal("artifacts"),
1478
+ namespace: Schema.String,
1479
+ }),
1480
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponseBinding36>;
1500
1481
 
1501
1482
  interface Container {
1502
1483
  /** Select which Durable Object class should get this container attached. */
@@ -1611,22 +1592,17 @@ interface WorkersMultipleStepMigrations {
1611
1592
  }[]
1612
1593
  | null;
1613
1594
  }
1614
- const WorkersMultipleStepMigrations =
1615
- /*@__PURE__*/ Schema.suspend(() =>
1616
- Schema.Struct({
1617
- newTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1618
- oldTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1619
- steps: Schema.optional(
1620
- Schema.Union([Schema.Array(MigrationStepParam), Schema.Null]),
1621
- ),
1622
- }).pipe(
1623
- Schema.encodeKeys({
1624
- newTag: "new_tag",
1625
- oldTag: "old_tag",
1626
- steps: "steps",
1627
- }),
1595
+ const WorkersMultipleStepMigrations = /*@__PURE__*/ Schema.suspend(() =>
1596
+ Schema.Struct({
1597
+ newTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1598
+ oldTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1599
+ steps: Schema.optional(
1600
+ Schema.Union([Schema.Array(MigrationStepParam), Schema.Null]),
1628
1601
  ),
1629
- ) as unknown as Schema.Codec<WorkersMultipleStepMigrations>;
1602
+ }).pipe(
1603
+ Schema.encodeKeys({ newTag: "new_tag", oldTag: "old_tag", steps: "steps" }),
1604
+ ),
1605
+ ) as unknown as Schema.Codec<WorkersMultipleStepMigrations>;
1630
1606
 
1631
1607
  interface Module {
1632
1608
  /** The base64-encoded module content. */
@@ -1696,13 +1672,13 @@ interface GetBetaWorkerVersionResponsePlacement4 {
1696
1672
  /** Cloud region for targeted placement in format 'provider:region'. */
1697
1673
  region: string;
1698
1674
  }
1699
- const GetBetaWorkerVersionResponsePlacement4 =
1700
- /*@__PURE__*/ Schema.suspend(() =>
1675
+ const GetBetaWorkerVersionResponsePlacement4 = /*@__PURE__*/ Schema.suspend(
1676
+ () =>
1701
1677
  Schema.Struct({
1702
1678
  mode: Schema.Literal("targeted"),
1703
1679
  region: Schema.String,
1704
1680
  }),
1705
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement4>;
1681
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement4>;
1706
1682
 
1707
1683
  interface GetBetaWorkerVersionResponsePlacement5 {
1708
1684
  /** HTTP hostname for targeted placement. */
@@ -1710,13 +1686,13 @@ interface GetBetaWorkerVersionResponsePlacement5 {
1710
1686
  /** Targeted placement mode. */
1711
1687
  mode: "targeted";
1712
1688
  }
1713
- const GetBetaWorkerVersionResponsePlacement5 =
1714
- /*@__PURE__*/ Schema.suspend(() =>
1689
+ const GetBetaWorkerVersionResponsePlacement5 = /*@__PURE__*/ Schema.suspend(
1690
+ () =>
1715
1691
  Schema.Struct({
1716
1692
  hostname: Schema.String,
1717
1693
  mode: Schema.Literal("targeted"),
1718
1694
  }),
1719
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement5>;
1695
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement5>;
1720
1696
 
1721
1697
  interface GetBetaWorkerVersionResponsePlacement6 {
1722
1698
  /** TCP host and port for targeted placement. */
@@ -1724,13 +1700,13 @@ interface GetBetaWorkerVersionResponsePlacement6 {
1724
1700
  /** Targeted placement mode. */
1725
1701
  mode: "targeted";
1726
1702
  }
1727
- const GetBetaWorkerVersionResponsePlacement6 =
1728
- /*@__PURE__*/ Schema.suspend(() =>
1703
+ const GetBetaWorkerVersionResponsePlacement6 = /*@__PURE__*/ Schema.suspend(
1704
+ () =>
1729
1705
  Schema.Struct({
1730
1706
  host: Schema.String,
1731
1707
  mode: Schema.Literal("targeted"),
1732
1708
  }),
1733
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement6>;
1709
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement6>;
1734
1710
 
1735
1711
  interface GetBetaWorkerVersionResponsePlacement7 {
1736
1712
  /** Targeted placement mode. */
@@ -1738,13 +1714,13 @@ interface GetBetaWorkerVersionResponsePlacement7 {
1738
1714
  /** Array of placement targets (currently limited to single target). */
1739
1715
  target: ({ region: string } | { hostname: string } | { host: string })[];
1740
1716
  }
1741
- const GetBetaWorkerVersionResponsePlacement7 =
1742
- /*@__PURE__*/ Schema.suspend(() =>
1717
+ const GetBetaWorkerVersionResponsePlacement7 = /*@__PURE__*/ Schema.suspend(
1718
+ () =>
1743
1719
  Schema.Struct({
1744
1720
  mode: Schema.Literal("targeted"),
1745
1721
  target: Schema.Array(Schema.Union([Region, Hostname, Host])),
1746
1722
  }),
1747
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement7>;
1723
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponsePlacement7>;
1748
1724
 
1749
1725
  interface ListBetaWorkerVersionsResponseResult {
1750
1726
  /** Version identifier. */
@@ -1982,134 +1958,129 @@ interface ListBetaWorkerVersionsResponseResult {
1982
1958
  /** @deprecated Usage model for the version. */
1983
1959
  usageModel?: "standard" | "bundled" | "unbound" | (string & {}) | null;
1984
1960
  }
1985
- const ListBetaWorkerVersionsResponseResult =
1986
- /*@__PURE__*/ Schema.suspend(() =>
1987
- Schema.Struct({
1988
- id: Schema.String,
1989
- createdOn: Schema.String,
1990
- number: Schema.Number,
1991
- urls: Schema.Array(Schema.String),
1992
- annotations: Schema.optional(Schema.Union([Annotations, Schema.Null])),
1993
- assets: Schema.optional(Schema.Union([Assets, Schema.Null])),
1994
- bindings: Schema.optional(
1995
- Schema.Union([
1996
- Schema.Array(
1997
- Schema.Union([
1998
- WorkersBindingKindSecretKey,
1999
- WorkersBindingKindRatelimit,
2000
- WorkersBindingKindSecretsStoreSecret,
2001
- WorkersBindingKindAISearch,
2002
- WorkersBindingKindAISearchNamespace,
2003
- WorkersBindingKindAnalyticsEngine,
2004
- WorkersBindingKindD1,
2005
- WorkersBindingKindDataBlob,
2006
- WorkersBindingKindDispatchNamespace,
2007
- WorkersBindingKindHyperdrive,
2008
- WorkersBindingKindJson,
2009
- WorkersBindingKindKVNamespace,
2010
- WorkersBindingKindMTLSCertificate,
2011
- WorkersBindingKindPlainText,
2012
- WorkersBindingKindPipelines,
2013
- WorkersBindingKindQueue,
2014
- WorkersBindingKindR2Bucket,
2015
- WorkersBindingKindService,
2016
- WorkersBindingKindTextBlob,
2017
- WorkersBindingKindVectorize,
2018
- WorkersBindingKindFlagship,
2019
- WorkersBindingKindWorkflow,
2020
- WorkersBindingKindWasmModule,
2021
- WorkersBindingKindVPCService,
2022
- GetBetaWorkerVersionResponseBinding36,
2023
- WorkersBindingKindAI,
2024
- WorkersBindingKindAssets,
2025
- WorkersBindingKindBrowser,
2026
- WorkersBindingKindDurableObjectNamespace,
2027
- WorkersBindingKindInherit,
2028
- WorkersBindingKindImages,
2029
- WorkersBindingKindMedia,
2030
- WorkersBindingKindSecretText,
2031
- WorkersBindingKindSendEmail,
2032
- WorkersBindingKindVersionMetadata,
2033
- WorkersBindingKindVPCNetwork,
2034
- GetBetaWorkerVersionResponseBinding35,
2035
- ]),
2036
- ),
2037
- Schema.Null,
2038
- ]),
2039
- ),
2040
- compatibilityDate: Schema.optional(
2041
- Schema.Union([Schema.String, Schema.Null]),
2042
- ),
2043
- compatibilityFlags: Schema.optional(
2044
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2045
- ),
2046
- containers: Schema.optional(
2047
- Schema.Union([Schema.Array(Container), Schema.Null]),
2048
- ),
2049
- limits: Schema.optional(Schema.Union([Limits, Schema.Null])),
2050
- mainModule: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2051
- migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2052
- migrations: Schema.optional(
2053
- Schema.Union([
2054
- Schema.Union([Schema.Unknown, WorkersMultipleStepMigrations]),
2055
- Schema.Null,
2056
- ]),
2057
- ),
2058
- modules: Schema.optional(
2059
- Schema.Union([Schema.Array(Module), Schema.Null]),
2060
- ),
2061
- placement: Schema.optional(
2062
- Schema.Union([
1961
+ const ListBetaWorkerVersionsResponseResult = /*@__PURE__*/ Schema.suspend(() =>
1962
+ Schema.Struct({
1963
+ id: Schema.String,
1964
+ createdOn: Schema.String,
1965
+ number: Schema.Number,
1966
+ urls: Schema.Array(Schema.String),
1967
+ annotations: Schema.optional(Schema.Union([Annotations, Schema.Null])),
1968
+ assets: Schema.optional(Schema.Union([Assets, Schema.Null])),
1969
+ bindings: Schema.optional(
1970
+ Schema.Union([
1971
+ Schema.Array(
2063
1972
  Schema.Union([
2064
- GetBetaWorkerVersionResponsePlacement4,
2065
- GetBetaWorkerVersionResponsePlacement5,
2066
- GetBetaWorkerVersionResponsePlacement6,
2067
- GetBetaWorkerVersionResponsePlacement7,
2068
- Mode,
2069
- Region,
2070
- Hostname,
2071
- Host,
2072
- ]),
2073
- Schema.Null,
2074
- ]),
2075
- ),
2076
- source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2077
- startupTimeMs: Schema.optional(
2078
- Schema.Union([Schema.Number, Schema.Null]),
2079
- ),
2080
- usageModel: Schema.optional(
2081
- Schema.Union([
2082
- Schema.Union([
2083
- Schema.Literals(["standard", "bundled", "unbound"]),
2084
- Schema.String,
1973
+ WorkersBindingKindSecretKey,
1974
+ WorkersBindingKindRatelimit,
1975
+ WorkersBindingKindSecretsStoreSecret,
1976
+ WorkersBindingKindAISearch,
1977
+ WorkersBindingKindAISearchNamespace,
1978
+ WorkersBindingKindAnalyticsEngine,
1979
+ WorkersBindingKindD1,
1980
+ WorkersBindingKindDataBlob,
1981
+ WorkersBindingKindDispatchNamespace,
1982
+ WorkersBindingKindHyperdrive,
1983
+ WorkersBindingKindJson,
1984
+ WorkersBindingKindKVNamespace,
1985
+ WorkersBindingKindMTLSCertificate,
1986
+ WorkersBindingKindPlainText,
1987
+ WorkersBindingKindPipelines,
1988
+ WorkersBindingKindQueue,
1989
+ WorkersBindingKindR2Bucket,
1990
+ WorkersBindingKindService,
1991
+ WorkersBindingKindTextBlob,
1992
+ WorkersBindingKindVectorize,
1993
+ WorkersBindingKindFlagship,
1994
+ WorkersBindingKindWorkflow,
1995
+ WorkersBindingKindWasmModule,
1996
+ WorkersBindingKindVPCService,
1997
+ GetBetaWorkerVersionResponseBinding36,
1998
+ WorkersBindingKindAI,
1999
+ WorkersBindingKindAssets,
2000
+ WorkersBindingKindBrowser,
2001
+ WorkersBindingKindDurableObjectNamespace,
2002
+ WorkersBindingKindInherit,
2003
+ WorkersBindingKindImages,
2004
+ WorkersBindingKindMedia,
2005
+ WorkersBindingKindSecretText,
2006
+ WorkersBindingKindSendEmail,
2007
+ WorkersBindingKindVersionMetadata,
2008
+ WorkersBindingKindVPCNetwork,
2009
+ GetBetaWorkerVersionResponseBinding35,
2085
2010
  ]),
2086
- Schema.Null,
2011
+ ),
2012
+ Schema.Null,
2013
+ ]),
2014
+ ),
2015
+ compatibilityDate: Schema.optional(
2016
+ Schema.Union([Schema.String, Schema.Null]),
2017
+ ),
2018
+ compatibilityFlags: Schema.optional(
2019
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2020
+ ),
2021
+ containers: Schema.optional(
2022
+ Schema.Union([Schema.Array(Container), Schema.Null]),
2023
+ ),
2024
+ limits: Schema.optional(Schema.Union([Limits, Schema.Null])),
2025
+ mainModule: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2026
+ migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2027
+ migrations: Schema.optional(
2028
+ Schema.Union([
2029
+ Schema.Union([Schema.Unknown, WorkersMultipleStepMigrations]),
2030
+ Schema.Null,
2031
+ ]),
2032
+ ),
2033
+ modules: Schema.optional(Schema.Union([Schema.Array(Module), Schema.Null])),
2034
+ placement: Schema.optional(
2035
+ Schema.Union([
2036
+ Schema.Union([
2037
+ GetBetaWorkerVersionResponsePlacement4,
2038
+ GetBetaWorkerVersionResponsePlacement5,
2039
+ GetBetaWorkerVersionResponsePlacement6,
2040
+ GetBetaWorkerVersionResponsePlacement7,
2041
+ Mode,
2042
+ Region,
2043
+ Hostname,
2044
+ Host,
2087
2045
  ]),
2088
- ),
2089
- }).pipe(
2090
- Schema.encodeKeys({
2091
- id: "id",
2092
- createdOn: "created_on",
2093
- number: "number",
2094
- urls: "urls",
2095
- annotations: "annotations",
2096
- assets: "assets",
2097
- bindings: "bindings",
2098
- compatibilityDate: "compatibility_date",
2099
- compatibilityFlags: "compatibility_flags",
2100
- containers: "containers",
2101
- limits: "limits",
2102
- mainModule: "main_module",
2103
- migrationTag: "migration_tag",
2104
- migrations: "migrations",
2105
- modules: "modules",
2106
- placement: "placement",
2107
- source: "source",
2108
- startupTimeMs: "startup_time_ms",
2109
- usageModel: "usage_model",
2110
- }),
2046
+ Schema.Null,
2047
+ ]),
2048
+ ),
2049
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2050
+ startupTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2051
+ usageModel: Schema.optional(
2052
+ Schema.Union([
2053
+ Schema.Union([
2054
+ Schema.Literals(["standard", "bundled", "unbound"]),
2055
+ Schema.String,
2056
+ ]),
2057
+ Schema.Null,
2058
+ ]),
2111
2059
  ),
2112
- ) as unknown as Schema.Codec<ListBetaWorkerVersionsResponseResult>;
2060
+ }).pipe(
2061
+ Schema.encodeKeys({
2062
+ id: "id",
2063
+ createdOn: "created_on",
2064
+ number: "number",
2065
+ urls: "urls",
2066
+ annotations: "annotations",
2067
+ assets: "assets",
2068
+ bindings: "bindings",
2069
+ compatibilityDate: "compatibility_date",
2070
+ compatibilityFlags: "compatibility_flags",
2071
+ containers: "containers",
2072
+ limits: "limits",
2073
+ mainModule: "main_module",
2074
+ migrationTag: "migration_tag",
2075
+ migrations: "migrations",
2076
+ modules: "modules",
2077
+ placement: "placement",
2078
+ source: "source",
2079
+ startupTimeMs: "startup_time_ms",
2080
+ usageModel: "usage_model",
2081
+ }),
2082
+ ),
2083
+ ) as unknown as Schema.Codec<ListBetaWorkerVersionsResponseResult>;
2113
2084
 
2114
2085
  interface Annotations2 {
2115
2086
  /** Human-readable message about the version. Truncated to 1000 bytes if longer. */
@@ -2145,8 +2116,8 @@ interface WorkersBindingKindDurableObjectNamespace2 {
2145
2116
  /** The script where the Durable Object is defined, if it is external to this Worker. */
2146
2117
  scriptName?: string | null;
2147
2118
  }
2148
- const WorkersBindingKindDurableObjectNamespace2 =
2149
- /*@__PURE__*/ Schema.suspend(() =>
2119
+ const WorkersBindingKindDurableObjectNamespace2 = /*@__PURE__*/ Schema.suspend(
2120
+ () =>
2150
2121
  Schema.Struct({
2151
2122
  name: Schema.String,
2152
2123
  type: Schema.Literal("durable_object_namespace"),
@@ -2168,7 +2139,7 @@ const WorkersBindingKindDurableObjectNamespace2 =
2168
2139
  scriptName: "script_name",
2169
2140
  }),
2170
2141
  ),
2171
- ) as unknown as Schema.Codec<WorkersBindingKindDurableObjectNamespace2>;
2142
+ ) as unknown as Schema.Codec<WorkersBindingKindDurableObjectNamespace2>;
2172
2143
 
2173
2144
  interface WorkersBindingKindSecretText2 {
2174
2145
  /** A JavaScript variable name for the binding. */
@@ -2178,14 +2149,13 @@ interface WorkersBindingKindSecretText2 {
2178
2149
  /** The kind of resource that the binding provides. */
2179
2150
  type: "secret_text";
2180
2151
  }
2181
- const WorkersBindingKindSecretText2 =
2182
- /*@__PURE__*/ Schema.suspend(() =>
2183
- Schema.Struct({
2184
- name: Schema.String,
2185
- text: Schema.String,
2186
- type: Schema.Literal("secret_text"),
2187
- }),
2188
- ) as unknown as Schema.Codec<WorkersBindingKindSecretText2>;
2152
+ const WorkersBindingKindSecretText2 = /*@__PURE__*/ Schema.suspend(() =>
2153
+ Schema.Struct({
2154
+ name: Schema.String,
2155
+ text: Schema.String,
2156
+ type: Schema.Literal("secret_text"),
2157
+ }),
2158
+ ) as unknown as Schema.Codec<WorkersBindingKindSecretText2>;
2189
2159
 
2190
2160
  interface WorkersBindingKindSecretKey2 {
2191
2161
  /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */
@@ -2700,60 +2670,59 @@ interface WorkersObservabilityFilterLeaf {
2700
2670
  /** Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. */
2701
2671
  value?: string | number | boolean | null;
2702
2672
  }
2703
- const WorkersObservabilityFilterLeaf =
2704
- /*@__PURE__*/ Schema.suspend(() =>
2705
- Schema.Struct({
2706
- key: Schema.String,
2707
- operation: Schema.Union([
2708
- Schema.Literals([
2709
- "includes",
2710
- "not_includes",
2711
- "starts_with",
2712
- "ends_with",
2713
- "regex",
2714
- "exists",
2715
- "is_null",
2716
- "in",
2717
- "not_in",
2718
- "eq",
2719
- "neq",
2720
- "gt",
2721
- "gte",
2722
- "lt",
2723
- "lte",
2724
- "=",
2725
- "!=",
2726
- ">",
2727
- ">=",
2728
- "<",
2729
- "<=",
2730
- "INCLUDES",
2731
- "DOES_NOT_INCLUDE",
2732
- "MATCH_REGEX",
2733
- "EXISTS",
2734
- "DOES_NOT_EXIST",
2735
- "IN",
2736
- "NOT_IN",
2737
- "STARTS_WITH",
2738
- "ENDS_WITH",
2739
- ]),
2740
- Schema.String,
2673
+ const WorkersObservabilityFilterLeaf = /*@__PURE__*/ Schema.suspend(() =>
2674
+ Schema.Struct({
2675
+ key: Schema.String,
2676
+ operation: Schema.Union([
2677
+ Schema.Literals([
2678
+ "includes",
2679
+ "not_includes",
2680
+ "starts_with",
2681
+ "ends_with",
2682
+ "regex",
2683
+ "exists",
2684
+ "is_null",
2685
+ "in",
2686
+ "not_in",
2687
+ "eq",
2688
+ "neq",
2689
+ "gt",
2690
+ "gte",
2691
+ "lt",
2692
+ "lte",
2693
+ "=",
2694
+ "!=",
2695
+ ">",
2696
+ ">=",
2697
+ "<",
2698
+ "<=",
2699
+ "INCLUDES",
2700
+ "DOES_NOT_INCLUDE",
2701
+ "MATCH_REGEX",
2702
+ "EXISTS",
2703
+ "DOES_NOT_EXIST",
2704
+ "IN",
2705
+ "NOT_IN",
2706
+ "STARTS_WITH",
2707
+ "ENDS_WITH",
2741
2708
  ]),
2742
- type: Schema.Union([
2743
- Schema.Literals(["string", "number", "boolean"]),
2744
- Schema.String,
2709
+ Schema.String,
2710
+ ]),
2711
+ type: Schema.Union([
2712
+ Schema.Literals(["string", "number", "boolean"]),
2713
+ Schema.String,
2714
+ ]),
2715
+ kind: Schema.optional(
2716
+ Schema.Union([Schema.Literal("filter"), Schema.Null]),
2717
+ ),
2718
+ value: Schema.optional(
2719
+ Schema.Union([
2720
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
2721
+ Schema.Null,
2745
2722
  ]),
2746
- kind: Schema.optional(
2747
- Schema.Union([Schema.Literal("filter"), Schema.Null]),
2748
- ),
2749
- value: Schema.optional(
2750
- Schema.Union([
2751
- Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
2752
- Schema.Null,
2753
- ]),
2754
- ),
2755
- }),
2756
- ) as unknown as Schema.Codec<WorkersObservabilityFilterLeaf>;
2723
+ ),
2724
+ }),
2725
+ ) as unknown as Schema.Codec<WorkersObservabilityFilterLeaf>;
2757
2726
 
2758
2727
  interface GroupBy {
2759
2728
  type: "string" | "number" | "boolean" | (string & {});
@@ -3114,8 +3083,8 @@ interface ListObservabilityQueriesResponseResult {
3114
3083
  updated: string;
3115
3084
  updatedBy: string;
3116
3085
  }
3117
- const ListObservabilityQueriesResponseResult =
3118
- /*@__PURE__*/ Schema.suspend(() =>
3086
+ const ListObservabilityQueriesResponseResult = /*@__PURE__*/ Schema.suspend(
3087
+ () =>
3119
3088
  Schema.Struct({
3120
3089
  id: Schema.String,
3121
3090
  adhoc: Schema.Boolean,
@@ -3127,7 +3096,7 @@ const ListObservabilityQueriesResponseResult =
3127
3096
  updated: Schema.String,
3128
3097
  updatedBy: Schema.String,
3129
3098
  }),
3130
- ) as unknown as Schema.Codec<ListObservabilityQueriesResponseResult>;
3099
+ ) as unknown as Schema.Codec<ListObservabilityQueriesResponseResult>;
3131
3100
 
3132
3101
  interface Needle2 {
3133
3102
  value: unknown;
@@ -4863,8 +4832,8 @@ interface KeysObservabilityTelemetryResponseResult {
4863
4832
  lastSeenAt: number;
4864
4833
  type: "string" | "boolean" | "number" | (string & {});
4865
4834
  }
4866
- const KeysObservabilityTelemetryResponseResult =
4867
- /*@__PURE__*/ Schema.suspend(() =>
4835
+ const KeysObservabilityTelemetryResponseResult = /*@__PURE__*/ Schema.suspend(
4836
+ () =>
4868
4837
  Schema.Struct({
4869
4838
  key: Schema.String,
4870
4839
  lastSeenAt: Schema.Number,
@@ -4873,7 +4842,7 @@ const KeysObservabilityTelemetryResponseResult =
4873
4842
  Schema.String,
4874
4843
  ]),
4875
4844
  }),
4876
- ) as unknown as Schema.Codec<KeysObservabilityTelemetryResponseResult>;
4845
+ ) as unknown as Schema.Codec<KeysObservabilityTelemetryResponseResult>;
4877
4846
 
4878
4847
  interface Query2 {
4879
4848
  id: string;
@@ -5610,8 +5579,8 @@ interface ValuesObservabilityTelemetryResponseResult {
5610
5579
  type: "string" | "boolean" | "number" | (string & {});
5611
5580
  value: string | number | boolean;
5612
5581
  }
5613
- const ValuesObservabilityTelemetryResponseResult =
5614
- /*@__PURE__*/ Schema.suspend(() =>
5582
+ const ValuesObservabilityTelemetryResponseResult = /*@__PURE__*/ Schema.suspend(
5583
+ () =>
5615
5584
  Schema.Struct({
5616
5585
  dataset: Schema.String,
5617
5586
  key: Schema.String,
@@ -5621,7 +5590,7 @@ const ValuesObservabilityTelemetryResponseResult =
5621
5590
  ]),
5622
5591
  value: Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
5623
5592
  }),
5624
- ) as unknown as Schema.Codec<ValuesObservabilityTelemetryResponseResult>;
5593
+ ) as unknown as Schema.Codec<ValuesObservabilityTelemetryResponseResult>;
5625
5594
 
5626
5595
  interface ListRoutesResponseResult {
5627
5596
  /** Identifier. */
@@ -5783,34 +5752,31 @@ interface ListScriptsResponseResultPlacement {
5783
5752
  | (string & {})
5784
5753
  | null;
5785
5754
  }
5786
- const ListScriptsResponseResultPlacement =
5787
- /*@__PURE__*/ Schema.suspend(() =>
5788
- Schema.Struct({
5789
- mode: Schema.Literal("smart"),
5790
- lastAnalyzedAt: Schema.optional(
5791
- Schema.Union([Schema.String, Schema.Null]),
5792
- ),
5793
- status: Schema.optional(
5755
+ const ListScriptsResponseResultPlacement = /*@__PURE__*/ Schema.suspend(() =>
5756
+ Schema.Struct({
5757
+ mode: Schema.Literal("smart"),
5758
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5759
+ status: Schema.optional(
5760
+ Schema.Union([
5794
5761
  Schema.Union([
5795
- Schema.Union([
5796
- Schema.Literals([
5797
- "SUCCESS",
5798
- "UNSUPPORTED_APPLICATION",
5799
- "INSUFFICIENT_INVOCATIONS",
5800
- ]),
5801
- Schema.String,
5762
+ Schema.Literals([
5763
+ "SUCCESS",
5764
+ "UNSUPPORTED_APPLICATION",
5765
+ "INSUFFICIENT_INVOCATIONS",
5802
5766
  ]),
5803
- Schema.Null,
5767
+ Schema.String,
5804
5768
  ]),
5805
- ),
5806
- }).pipe(
5807
- Schema.encodeKeys({
5808
- mode: "mode",
5809
- lastAnalyzedAt: "last_analyzed_at",
5810
- status: "status",
5811
- }),
5769
+ Schema.Null,
5770
+ ]),
5812
5771
  ),
5813
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement>;
5772
+ }).pipe(
5773
+ Schema.encodeKeys({
5774
+ mode: "mode",
5775
+ lastAnalyzedAt: "last_analyzed_at",
5776
+ status: "status",
5777
+ }),
5778
+ ),
5779
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement>;
5814
5780
 
5815
5781
  interface ListScriptsResponseResultPlacement1 {
5816
5782
  /** Cloud region for targeted placement in format 'provider:region'. */
@@ -5825,34 +5791,31 @@ interface ListScriptsResponseResultPlacement1 {
5825
5791
  | (string & {})
5826
5792
  | null;
5827
5793
  }
5828
- const ListScriptsResponseResultPlacement1 =
5829
- /*@__PURE__*/ Schema.suspend(() =>
5830
- Schema.Struct({
5831
- region: Schema.String,
5832
- lastAnalyzedAt: Schema.optional(
5833
- Schema.Union([Schema.String, Schema.Null]),
5834
- ),
5835
- status: Schema.optional(
5794
+ const ListScriptsResponseResultPlacement1 = /*@__PURE__*/ Schema.suspend(() =>
5795
+ Schema.Struct({
5796
+ region: Schema.String,
5797
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5798
+ status: Schema.optional(
5799
+ Schema.Union([
5836
5800
  Schema.Union([
5837
- Schema.Union([
5838
- Schema.Literals([
5839
- "SUCCESS",
5840
- "UNSUPPORTED_APPLICATION",
5841
- "INSUFFICIENT_INVOCATIONS",
5842
- ]),
5843
- Schema.String,
5801
+ Schema.Literals([
5802
+ "SUCCESS",
5803
+ "UNSUPPORTED_APPLICATION",
5804
+ "INSUFFICIENT_INVOCATIONS",
5844
5805
  ]),
5845
- Schema.Null,
5806
+ Schema.String,
5846
5807
  ]),
5847
- ),
5848
- }).pipe(
5849
- Schema.encodeKeys({
5850
- region: "region",
5851
- lastAnalyzedAt: "last_analyzed_at",
5852
- status: "status",
5853
- }),
5808
+ Schema.Null,
5809
+ ]),
5854
5810
  ),
5855
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement1>;
5811
+ }).pipe(
5812
+ Schema.encodeKeys({
5813
+ region: "region",
5814
+ lastAnalyzedAt: "last_analyzed_at",
5815
+ status: "status",
5816
+ }),
5817
+ ),
5818
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement1>;
5856
5819
 
5857
5820
  interface ListScriptsResponseResultPlacement2 {
5858
5821
  /** HTTP hostname for targeted placement. */
@@ -5867,37 +5830,34 @@ interface ListScriptsResponseResultPlacement2 {
5867
5830
  | (string & {})
5868
5831
  | null;
5869
5832
  }
5870
- const ListScriptsResponseResultPlacement2 =
5871
- /*@__PURE__*/ Schema.suspend(() =>
5872
- Schema.Struct({
5873
- hostname: Schema.String,
5874
- lastAnalyzedAt: Schema.optional(
5875
- Schema.Union([Schema.String, Schema.Null]),
5876
- ),
5877
- status: Schema.optional(
5833
+ const ListScriptsResponseResultPlacement2 = /*@__PURE__*/ Schema.suspend(() =>
5834
+ Schema.Struct({
5835
+ hostname: Schema.String,
5836
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5837
+ status: Schema.optional(
5838
+ Schema.Union([
5878
5839
  Schema.Union([
5879
- Schema.Union([
5880
- Schema.Literals([
5881
- "SUCCESS",
5882
- "UNSUPPORTED_APPLICATION",
5883
- "INSUFFICIENT_INVOCATIONS",
5884
- ]),
5885
- Schema.String,
5840
+ Schema.Literals([
5841
+ "SUCCESS",
5842
+ "UNSUPPORTED_APPLICATION",
5843
+ "INSUFFICIENT_INVOCATIONS",
5886
5844
  ]),
5887
- Schema.Null,
5845
+ Schema.String,
5888
5846
  ]),
5889
- ),
5890
- }).pipe(
5891
- Schema.encodeKeys({
5892
- hostname: "hostname",
5893
- lastAnalyzedAt: "last_analyzed_at",
5894
- status: "status",
5895
- }),
5847
+ Schema.Null,
5848
+ ]),
5896
5849
  ),
5897
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement2>;
5898
-
5899
- interface ListScriptsResponseResultPlacement3 {
5900
- /** TCP host and port for targeted placement. */
5850
+ }).pipe(
5851
+ Schema.encodeKeys({
5852
+ hostname: "hostname",
5853
+ lastAnalyzedAt: "last_analyzed_at",
5854
+ status: "status",
5855
+ }),
5856
+ ),
5857
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement2>;
5858
+
5859
+ interface ListScriptsResponseResultPlacement3 {
5860
+ /** TCP host and port for targeted placement. */
5901
5861
  host: string;
5902
5862
  /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */
5903
5863
  lastAnalyzedAt?: string | null;
@@ -5909,34 +5869,31 @@ interface ListScriptsResponseResultPlacement3 {
5909
5869
  | (string & {})
5910
5870
  | null;
5911
5871
  }
5912
- const ListScriptsResponseResultPlacement3 =
5913
- /*@__PURE__*/ Schema.suspend(() =>
5914
- Schema.Struct({
5915
- host: Schema.String,
5916
- lastAnalyzedAt: Schema.optional(
5917
- Schema.Union([Schema.String, Schema.Null]),
5918
- ),
5919
- status: Schema.optional(
5872
+ const ListScriptsResponseResultPlacement3 = /*@__PURE__*/ Schema.suspend(() =>
5873
+ Schema.Struct({
5874
+ host: Schema.String,
5875
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5876
+ status: Schema.optional(
5877
+ Schema.Union([
5920
5878
  Schema.Union([
5921
- Schema.Union([
5922
- Schema.Literals([
5923
- "SUCCESS",
5924
- "UNSUPPORTED_APPLICATION",
5925
- "INSUFFICIENT_INVOCATIONS",
5926
- ]),
5927
- Schema.String,
5879
+ Schema.Literals([
5880
+ "SUCCESS",
5881
+ "UNSUPPORTED_APPLICATION",
5882
+ "INSUFFICIENT_INVOCATIONS",
5928
5883
  ]),
5929
- Schema.Null,
5884
+ Schema.String,
5930
5885
  ]),
5931
- ),
5932
- }).pipe(
5933
- Schema.encodeKeys({
5934
- host: "host",
5935
- lastAnalyzedAt: "last_analyzed_at",
5936
- status: "status",
5937
- }),
5886
+ Schema.Null,
5887
+ ]),
5938
5888
  ),
5939
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement3>;
5889
+ }).pipe(
5890
+ Schema.encodeKeys({
5891
+ host: "host",
5892
+ lastAnalyzedAt: "last_analyzed_at",
5893
+ status: "status",
5894
+ }),
5895
+ ),
5896
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement3>;
5940
5897
 
5941
5898
  interface ListScriptsResponseResultPlacement4 {
5942
5899
  /** Targeted placement mode. */
@@ -5953,36 +5910,33 @@ interface ListScriptsResponseResultPlacement4 {
5953
5910
  | (string & {})
5954
5911
  | null;
5955
5912
  }
5956
- const ListScriptsResponseResultPlacement4 =
5957
- /*@__PURE__*/ Schema.suspend(() =>
5958
- Schema.Struct({
5959
- mode: Schema.Literal("targeted"),
5960
- region: Schema.String,
5961
- lastAnalyzedAt: Schema.optional(
5962
- Schema.Union([Schema.String, Schema.Null]),
5963
- ),
5964
- status: Schema.optional(
5913
+ const ListScriptsResponseResultPlacement4 = /*@__PURE__*/ Schema.suspend(() =>
5914
+ Schema.Struct({
5915
+ mode: Schema.Literal("targeted"),
5916
+ region: Schema.String,
5917
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5918
+ status: Schema.optional(
5919
+ Schema.Union([
5965
5920
  Schema.Union([
5966
- Schema.Union([
5967
- Schema.Literals([
5968
- "SUCCESS",
5969
- "UNSUPPORTED_APPLICATION",
5970
- "INSUFFICIENT_INVOCATIONS",
5971
- ]),
5972
- Schema.String,
5921
+ Schema.Literals([
5922
+ "SUCCESS",
5923
+ "UNSUPPORTED_APPLICATION",
5924
+ "INSUFFICIENT_INVOCATIONS",
5973
5925
  ]),
5974
- Schema.Null,
5926
+ Schema.String,
5975
5927
  ]),
5976
- ),
5977
- }).pipe(
5978
- Schema.encodeKeys({
5979
- mode: "mode",
5980
- region: "region",
5981
- lastAnalyzedAt: "last_analyzed_at",
5982
- status: "status",
5983
- }),
5928
+ Schema.Null,
5929
+ ]),
5984
5930
  ),
5985
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement4>;
5931
+ }).pipe(
5932
+ Schema.encodeKeys({
5933
+ mode: "mode",
5934
+ region: "region",
5935
+ lastAnalyzedAt: "last_analyzed_at",
5936
+ status: "status",
5937
+ }),
5938
+ ),
5939
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement4>;
5986
5940
 
5987
5941
  interface ListScriptsResponseResultPlacement5 {
5988
5942
  /** HTTP hostname for targeted placement. */
@@ -5999,36 +5953,33 @@ interface ListScriptsResponseResultPlacement5 {
5999
5953
  | (string & {})
6000
5954
  | null;
6001
5955
  }
6002
- const ListScriptsResponseResultPlacement5 =
6003
- /*@__PURE__*/ Schema.suspend(() =>
6004
- Schema.Struct({
6005
- hostname: Schema.String,
6006
- mode: Schema.Literal("targeted"),
6007
- lastAnalyzedAt: Schema.optional(
6008
- Schema.Union([Schema.String, Schema.Null]),
6009
- ),
6010
- status: Schema.optional(
5956
+ const ListScriptsResponseResultPlacement5 = /*@__PURE__*/ Schema.suspend(() =>
5957
+ Schema.Struct({
5958
+ hostname: Schema.String,
5959
+ mode: Schema.Literal("targeted"),
5960
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5961
+ status: Schema.optional(
5962
+ Schema.Union([
6011
5963
  Schema.Union([
6012
- Schema.Union([
6013
- Schema.Literals([
6014
- "SUCCESS",
6015
- "UNSUPPORTED_APPLICATION",
6016
- "INSUFFICIENT_INVOCATIONS",
6017
- ]),
6018
- Schema.String,
5964
+ Schema.Literals([
5965
+ "SUCCESS",
5966
+ "UNSUPPORTED_APPLICATION",
5967
+ "INSUFFICIENT_INVOCATIONS",
6019
5968
  ]),
6020
- Schema.Null,
5969
+ Schema.String,
6021
5970
  ]),
6022
- ),
6023
- }).pipe(
6024
- Schema.encodeKeys({
6025
- hostname: "hostname",
6026
- mode: "mode",
6027
- lastAnalyzedAt: "last_analyzed_at",
6028
- status: "status",
6029
- }),
5971
+ Schema.Null,
5972
+ ]),
6030
5973
  ),
6031
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement5>;
5974
+ }).pipe(
5975
+ Schema.encodeKeys({
5976
+ hostname: "hostname",
5977
+ mode: "mode",
5978
+ lastAnalyzedAt: "last_analyzed_at",
5979
+ status: "status",
5980
+ }),
5981
+ ),
5982
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement5>;
6032
5983
 
6033
5984
  interface ListScriptsResponseResultPlacement6 {
6034
5985
  /** TCP host and port for targeted placement. */
@@ -6045,36 +5996,33 @@ interface ListScriptsResponseResultPlacement6 {
6045
5996
  | (string & {})
6046
5997
  | null;
6047
5998
  }
6048
- const ListScriptsResponseResultPlacement6 =
6049
- /*@__PURE__*/ Schema.suspend(() =>
6050
- Schema.Struct({
6051
- host: Schema.String,
6052
- mode: Schema.Literal("targeted"),
6053
- lastAnalyzedAt: Schema.optional(
6054
- Schema.Union([Schema.String, Schema.Null]),
6055
- ),
6056
- status: Schema.optional(
5999
+ const ListScriptsResponseResultPlacement6 = /*@__PURE__*/ Schema.suspend(() =>
6000
+ Schema.Struct({
6001
+ host: Schema.String,
6002
+ mode: Schema.Literal("targeted"),
6003
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
6004
+ status: Schema.optional(
6005
+ Schema.Union([
6057
6006
  Schema.Union([
6058
- Schema.Union([
6059
- Schema.Literals([
6060
- "SUCCESS",
6061
- "UNSUPPORTED_APPLICATION",
6062
- "INSUFFICIENT_INVOCATIONS",
6063
- ]),
6064
- Schema.String,
6007
+ Schema.Literals([
6008
+ "SUCCESS",
6009
+ "UNSUPPORTED_APPLICATION",
6010
+ "INSUFFICIENT_INVOCATIONS",
6065
6011
  ]),
6066
- Schema.Null,
6012
+ Schema.String,
6067
6013
  ]),
6068
- ),
6069
- }).pipe(
6070
- Schema.encodeKeys({
6071
- host: "host",
6072
- mode: "mode",
6073
- lastAnalyzedAt: "last_analyzed_at",
6074
- status: "status",
6075
- }),
6014
+ Schema.Null,
6015
+ ]),
6076
6016
  ),
6077
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement6>;
6017
+ }).pipe(
6018
+ Schema.encodeKeys({
6019
+ host: "host",
6020
+ mode: "mode",
6021
+ lastAnalyzedAt: "last_analyzed_at",
6022
+ status: "status",
6023
+ }),
6024
+ ),
6025
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement6>;
6078
6026
 
6079
6027
  interface ListScriptsResponseResultPlacement7 {
6080
6028
  /** Targeted placement mode. */
@@ -6091,36 +6039,33 @@ interface ListScriptsResponseResultPlacement7 {
6091
6039
  | (string & {})
6092
6040
  | null;
6093
6041
  }
6094
- const ListScriptsResponseResultPlacement7 =
6095
- /*@__PURE__*/ Schema.suspend(() =>
6096
- Schema.Struct({
6097
- mode: Schema.Literal("targeted"),
6098
- target: Schema.Array(Schema.Union([Region, Hostname, Host])),
6099
- lastAnalyzedAt: Schema.optional(
6100
- Schema.Union([Schema.String, Schema.Null]),
6101
- ),
6102
- status: Schema.optional(
6042
+ const ListScriptsResponseResultPlacement7 = /*@__PURE__*/ Schema.suspend(() =>
6043
+ Schema.Struct({
6044
+ mode: Schema.Literal("targeted"),
6045
+ target: Schema.Array(Schema.Union([Region, Hostname, Host])),
6046
+ lastAnalyzedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
6047
+ status: Schema.optional(
6048
+ Schema.Union([
6103
6049
  Schema.Union([
6104
- Schema.Union([
6105
- Schema.Literals([
6106
- "SUCCESS",
6107
- "UNSUPPORTED_APPLICATION",
6108
- "INSUFFICIENT_INVOCATIONS",
6109
- ]),
6110
- Schema.String,
6050
+ Schema.Literals([
6051
+ "SUCCESS",
6052
+ "UNSUPPORTED_APPLICATION",
6053
+ "INSUFFICIENT_INVOCATIONS",
6111
6054
  ]),
6112
- Schema.Null,
6055
+ Schema.String,
6113
6056
  ]),
6114
- ),
6115
- }).pipe(
6116
- Schema.encodeKeys({
6117
- mode: "mode",
6118
- target: "target",
6119
- lastAnalyzedAt: "last_analyzed_at",
6120
- status: "status",
6121
- }),
6057
+ Schema.Null,
6058
+ ]),
6122
6059
  ),
6123
- ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement7>;
6060
+ }).pipe(
6061
+ Schema.encodeKeys({
6062
+ mode: "mode",
6063
+ target: "target",
6064
+ lastAnalyzedAt: "last_analyzed_at",
6065
+ status: "status",
6066
+ }),
6067
+ ),
6068
+ ) as unknown as Schema.Codec<ListScriptsResponseResultPlacement7>;
6124
6069
 
6125
6070
  interface ConsumerScript {
6126
6071
  /** Name of Worker that is to be the consumer. */
@@ -6514,13 +6459,13 @@ interface PutScriptRequestMetadataBinding37Simple {
6514
6459
  limit: number;
6515
6460
  period: number;
6516
6461
  }
6517
- const PutScriptRequestMetadataBinding37Simple =
6518
- /*@__PURE__*/ Schema.suspend(() =>
6462
+ const PutScriptRequestMetadataBinding37Simple = /*@__PURE__*/ Schema.suspend(
6463
+ () =>
6519
6464
  Schema.Struct({
6520
6465
  limit: Schema.Number,
6521
6466
  period: Schema.Number,
6522
6467
  }),
6523
- ) as unknown as Schema.Codec<PutScriptRequestMetadataBinding37Simple>;
6468
+ ) as unknown as Schema.Codec<PutScriptRequestMetadataBinding37Simple>;
6524
6469
 
6525
6470
  interface PutScriptRequestMetadataBinding37 {
6526
6471
  name: string;
@@ -6528,41 +6473,39 @@ interface PutScriptRequestMetadataBinding37 {
6528
6473
  namespaceId: string;
6529
6474
  simple: { limit: number; period: number };
6530
6475
  }
6531
- const PutScriptRequestMetadataBinding37 =
6532
- /*@__PURE__*/ Schema.suspend(() =>
6533
- Schema.Struct({
6534
- name: Schema.String,
6535
- type: Schema.Literal("ratelimit"),
6536
- namespaceId: Schema.String,
6537
- simple: PutScriptRequestMetadataBinding37Simple,
6538
- }).pipe(
6539
- Schema.encodeKeys({
6540
- name: "name",
6541
- type: "type",
6542
- namespaceId: "namespace_id",
6543
- simple: "simple",
6544
- }),
6545
- ),
6546
- ) as unknown as Schema.Codec<PutScriptRequestMetadataBinding37>;
6476
+ const PutScriptRequestMetadataBinding37 = /*@__PURE__*/ Schema.suspend(() =>
6477
+ Schema.Struct({
6478
+ name: Schema.String,
6479
+ type: Schema.Literal("ratelimit"),
6480
+ namespaceId: Schema.String,
6481
+ simple: PutScriptRequestMetadataBinding37Simple,
6482
+ }).pipe(
6483
+ Schema.encodeKeys({
6484
+ name: "name",
6485
+ type: "type",
6486
+ namespaceId: "namespace_id",
6487
+ simple: "simple",
6488
+ }),
6489
+ ),
6490
+ ) as unknown as Schema.Codec<PutScriptRequestMetadataBinding37>;
6547
6491
 
6548
6492
  interface PutScriptRequestMetadataCache {
6549
6493
  enabled?: boolean | null;
6550
6494
  crossVersionCache?: boolean | null;
6551
6495
  }
6552
- const PutScriptRequestMetadataCache =
6553
- /*@__PURE__*/ Schema.suspend(() =>
6554
- Schema.Struct({
6555
- enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
6556
- crossVersionCache: Schema.optional(
6557
- Schema.Union([Schema.Boolean, Schema.Null]),
6558
- ),
6559
- }).pipe(
6560
- Schema.encodeKeys({
6561
- enabled: "enabled",
6562
- crossVersionCache: "cross_version_cache",
6563
- }),
6496
+ const PutScriptRequestMetadataCache = /*@__PURE__*/ Schema.suspend(() =>
6497
+ Schema.Struct({
6498
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
6499
+ crossVersionCache: Schema.optional(
6500
+ Schema.Union([Schema.Boolean, Schema.Null]),
6564
6501
  ),
6565
- ) as unknown as Schema.Codec<PutScriptRequestMetadataCache>;
6502
+ }).pipe(
6503
+ Schema.encodeKeys({
6504
+ enabled: "enabled",
6505
+ crossVersionCache: "cross_version_cache",
6506
+ }),
6507
+ ),
6508
+ ) as unknown as Schema.Codec<PutScriptRequestMetadataCache>;
6566
6509
 
6567
6510
  interface Metadata2 {
6568
6511
  /** Annotations for the version created by this upload. */
@@ -6979,6 +6922,15 @@ const Metadata2 = /*@__PURE__*/ Schema.suspend(() =>
6979
6922
  ),
6980
6923
  ) as unknown as Schema.Codec<Metadata2>;
6981
6924
 
6925
+ interface PutScriptResponsePlacement8 {
6926
+ mode: "targeted";
6927
+ }
6928
+ const PutScriptResponsePlacement8 = /*@__PURE__*/ Schema.suspend(() =>
6929
+ Schema.Struct({
6930
+ mode: Schema.Literal("targeted"),
6931
+ }),
6932
+ ) as unknown as Schema.Codec<PutScriptResponsePlacement8>;
6933
+
6982
6934
  interface ScriptSearchResponseItem {
6983
6935
  /** Identifier. */
6984
6936
  id: string;
@@ -8014,8 +7966,8 @@ interface CreateScriptEdgePreviewRequestMetadata {
8014
7966
  keepAssets?: boolean | null;
8015
7967
  tags?: string[] | null;
8016
7968
  }
8017
- const CreateScriptEdgePreviewRequestMetadata =
8018
- /*@__PURE__*/ Schema.suspend(() =>
7969
+ const CreateScriptEdgePreviewRequestMetadata = /*@__PURE__*/ Schema.suspend(
7970
+ () =>
8019
7971
  Schema.Struct({
8020
7972
  mainModule: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
8021
7973
  bodyPart: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -8161,7 +8113,7 @@ const CreateScriptEdgePreviewRequestMetadata =
8161
8113
  tags: "tags",
8162
8114
  }),
8163
8115
  ),
8164
- ) as unknown as Schema.Codec<CreateScriptEdgePreviewRequestMetadata>;
8116
+ ) as unknown as Schema.Codec<CreateScriptEdgePreviewRequestMetadata>;
8165
8117
 
8166
8118
  interface CreateScriptEdgePreviewRequestWranglerSessionConfig {
8167
8119
  workersDev: true;
@@ -8961,14 +8913,13 @@ interface ListScriptVersionsResponseResultItem {
8961
8913
  /** Sequential version number. */
8962
8914
  number?: number | null;
8963
8915
  }
8964
- const ListScriptVersionsResponseResultItem =
8965
- /*@__PURE__*/ Schema.suspend(() =>
8966
- Schema.Struct({
8967
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
8968
- metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
8969
- number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
8970
- }),
8971
- ) as unknown as Schema.Codec<ListScriptVersionsResponseResultItem>;
8916
+ const ListScriptVersionsResponseResultItem = /*@__PURE__*/ Schema.suspend(() =>
8917
+ Schema.Struct({
8918
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
8919
+ metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
8920
+ number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
8921
+ }),
8922
+ ) as unknown as Schema.Codec<ListScriptVersionsResponseResultItem>;
8972
8923
 
8973
8924
  interface ListScriptVersionsResponseResult {
8974
8925
  items?:
@@ -8998,17 +8949,16 @@ interface ListScriptVersionsResponseResult {
8998
8949
  }[]
8999
8950
  | null;
9000
8951
  }
9001
- const ListScriptVersionsResponseResult =
9002
- /*@__PURE__*/ Schema.suspend(() =>
9003
- Schema.Struct({
9004
- items: Schema.optional(
9005
- Schema.Union([
9006
- Schema.Array(ListScriptVersionsResponseResultItem),
9007
- Schema.Null,
9008
- ]),
9009
- ),
9010
- }),
9011
- ) as unknown as Schema.Codec<ListScriptVersionsResponseResult>;
8952
+ const ListScriptVersionsResponseResult = /*@__PURE__*/ Schema.suspend(() =>
8953
+ Schema.Struct({
8954
+ items: Schema.optional(
8955
+ Schema.Union([
8956
+ Schema.Array(ListScriptVersionsResponseResultItem),
8957
+ Schema.Null,
8958
+ ]),
8959
+ ),
8960
+ }),
8961
+ ) as unknown as Schema.Codec<ListScriptVersionsResponseResult>;
9012
8962
 
9013
8963
  interface Annotations5 {
9014
8964
  /** Associated alias for a version. */
@@ -9284,51 +9234,47 @@ export interface GetAccountSettingRequest {
9284
9234
  accountId: string;
9285
9235
  }
9286
9236
 
9287
- export const GetAccountSettingRequest =
9288
- /*@__PURE__*/ Schema.suspend(() =>
9289
- Schema.Struct({
9290
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9291
- }).pipe(
9292
- T.Http({
9293
- method: "GET",
9294
- path: "/accounts/{account_id}/workers/account-settings",
9295
- }),
9296
- ),
9297
- ) as unknown as Schema.Codec<GetAccountSettingRequest>;
9237
+ export const GetAccountSettingRequest = /*@__PURE__*/ Schema.suspend(() =>
9238
+ Schema.Struct({
9239
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9240
+ }).pipe(
9241
+ T.Http({
9242
+ method: "GET",
9243
+ path: "/accounts/{account_id}/workers/account-settings",
9244
+ }),
9245
+ ),
9246
+ ) as unknown as Schema.Codec<GetAccountSettingRequest>;
9298
9247
 
9299
9248
  export interface GetAccountSettingResponse {
9300
9249
  defaultUsageModel?: string | null;
9301
9250
  greenCompute?: boolean | null;
9302
9251
  }
9303
9252
 
9304
- export const GetAccountSettingResponse =
9305
- /*@__PURE__*/ Schema.suspend(() =>
9306
- Schema.Struct({
9307
- defaultUsageModel: Schema.optional(
9308
- Schema.Union([Schema.String, Schema.Null]),
9309
- ),
9310
- greenCompute: Schema.optional(
9311
- Schema.Union([Schema.Boolean, Schema.Null]),
9312
- ),
9313
- })
9314
- .pipe(
9315
- Schema.encodeKeys({
9316
- defaultUsageModel: "default_usage_model",
9317
- greenCompute: "green_compute",
9318
- }),
9319
- )
9320
- .pipe(T.ResponsePath("result")),
9321
- ) as unknown as Schema.Codec<GetAccountSettingResponse>;
9322
-
9323
- export type GetAccountSettingError = DefaultErrors | InvalidRoute | Forbidden;
9324
-
9325
- export const getAccountSetting: API.OperationMethod<
9326
- GetAccountSettingRequest,
9327
- GetAccountSettingResponse,
9328
- GetAccountSettingError,
9329
- Credentials | HttpClient.HttpClient
9330
- > = /*@__PURE__*/ API.make(() => ({
9331
- input: GetAccountSettingRequest,
9253
+ export const GetAccountSettingResponse = /*@__PURE__*/ Schema.suspend(() =>
9254
+ Schema.Struct({
9255
+ defaultUsageModel: Schema.optional(
9256
+ Schema.Union([Schema.String, Schema.Null]),
9257
+ ),
9258
+ greenCompute: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
9259
+ })
9260
+ .pipe(
9261
+ Schema.encodeKeys({
9262
+ defaultUsageModel: "default_usage_model",
9263
+ greenCompute: "green_compute",
9264
+ }),
9265
+ )
9266
+ .pipe(T.ResponsePath("result")),
9267
+ ) as unknown as Schema.Codec<GetAccountSettingResponse>;
9268
+
9269
+ export type GetAccountSettingError = DefaultErrors | InvalidRoute | Forbidden;
9270
+
9271
+ export const getAccountSetting: API.OperationMethod<
9272
+ GetAccountSettingRequest,
9273
+ GetAccountSettingResponse,
9274
+ GetAccountSettingError,
9275
+ Credentials | HttpClient.HttpClient
9276
+ > = /*@__PURE__*/ API.make(() => ({
9277
+ input: GetAccountSettingRequest,
9332
9278
  output: GetAccountSettingResponse,
9333
9279
  errors: [InvalidRoute, Forbidden],
9334
9280
  }));
@@ -9342,47 +9288,43 @@ export interface PutAccountSettingRequest {
9342
9288
  greenCompute?: boolean;
9343
9289
  }
9344
9290
 
9345
- export const PutAccountSettingRequest =
9346
- /*@__PURE__*/ Schema.suspend(() =>
9347
- Schema.Struct({
9348
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9349
- defaultUsageModel: Schema.optional(Schema.String),
9350
- greenCompute: Schema.optional(Schema.Boolean),
9351
- }).pipe(
9352
- Schema.encodeKeys({
9353
- defaultUsageModel: "default_usage_model",
9354
- greenCompute: "green_compute",
9355
- }),
9356
- T.Http({
9357
- method: "PUT",
9358
- path: "/accounts/{account_id}/workers/account-settings",
9359
- }),
9360
- ),
9361
- ) as unknown as Schema.Codec<PutAccountSettingRequest>;
9291
+ export const PutAccountSettingRequest = /*@__PURE__*/ Schema.suspend(() =>
9292
+ Schema.Struct({
9293
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9294
+ defaultUsageModel: Schema.optional(Schema.String),
9295
+ greenCompute: Schema.optional(Schema.Boolean),
9296
+ }).pipe(
9297
+ Schema.encodeKeys({
9298
+ defaultUsageModel: "default_usage_model",
9299
+ greenCompute: "green_compute",
9300
+ }),
9301
+ T.Http({
9302
+ method: "PUT",
9303
+ path: "/accounts/{account_id}/workers/account-settings",
9304
+ }),
9305
+ ),
9306
+ ) as unknown as Schema.Codec<PutAccountSettingRequest>;
9362
9307
 
9363
9308
  export interface PutAccountSettingResponse {
9364
9309
  defaultUsageModel?: string | null;
9365
9310
  greenCompute?: boolean | null;
9366
9311
  }
9367
9312
 
9368
- export const PutAccountSettingResponse =
9369
- /*@__PURE__*/ Schema.suspend(() =>
9370
- Schema.Struct({
9371
- defaultUsageModel: Schema.optional(
9372
- Schema.Union([Schema.String, Schema.Null]),
9373
- ),
9374
- greenCompute: Schema.optional(
9375
- Schema.Union([Schema.Boolean, Schema.Null]),
9376
- ),
9377
- })
9378
- .pipe(
9379
- Schema.encodeKeys({
9380
- defaultUsageModel: "default_usage_model",
9381
- greenCompute: "green_compute",
9382
- }),
9383
- )
9384
- .pipe(T.ResponsePath("result")),
9385
- ) as unknown as Schema.Codec<PutAccountSettingResponse>;
9313
+ export const PutAccountSettingResponse = /*@__PURE__*/ Schema.suspend(() =>
9314
+ Schema.Struct({
9315
+ defaultUsageModel: Schema.optional(
9316
+ Schema.Union([Schema.String, Schema.Null]),
9317
+ ),
9318
+ greenCompute: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
9319
+ })
9320
+ .pipe(
9321
+ Schema.encodeKeys({
9322
+ defaultUsageModel: "default_usage_model",
9323
+ greenCompute: "green_compute",
9324
+ }),
9325
+ )
9326
+ .pipe(T.ResponsePath("result")),
9327
+ ) as unknown as Schema.Codec<PutAccountSettingResponse>;
9386
9328
 
9387
9329
  export type PutAccountSettingError = DefaultErrors | InvalidRoute | Forbidden;
9388
9330
 
@@ -9412,35 +9354,33 @@ export interface CreateAssetUploadRequest {
9412
9354
  body: Record<string, unknown>;
9413
9355
  }
9414
9356
 
9415
- export const CreateAssetUploadRequest =
9416
- /*@__PURE__*/ Schema.suspend(() =>
9417
- Schema.Struct({
9418
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9419
- base64: Schema.Literal(true).pipe(T.HttpQuery("base64")),
9420
- jwtToken: Schema.optional(Schema.String).pipe(
9421
- T.HttpHeader("Authorization"),
9422
- ),
9423
- body: Schema.Record(Schema.String, Schema.Unknown).pipe(T.HttpBody()),
9424
- }).pipe(
9425
- T.Http({
9426
- method: "POST",
9427
- path: "/accounts/{account_id}/workers/assets/upload",
9428
- contentType: "multipart",
9429
- }),
9357
+ export const CreateAssetUploadRequest = /*@__PURE__*/ Schema.suspend(() =>
9358
+ Schema.Struct({
9359
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9360
+ base64: Schema.Literal(true).pipe(T.HttpQuery("base64")),
9361
+ jwtToken: Schema.optional(Schema.String).pipe(
9362
+ T.HttpHeader("Authorization"),
9430
9363
  ),
9431
- ) as unknown as Schema.Codec<CreateAssetUploadRequest>;
9364
+ body: Schema.Record(Schema.String, Schema.Unknown).pipe(T.HttpBody()),
9365
+ }).pipe(
9366
+ T.Http({
9367
+ method: "POST",
9368
+ path: "/accounts/{account_id}/workers/assets/upload",
9369
+ contentType: "multipart",
9370
+ }),
9371
+ ),
9372
+ ) as unknown as Schema.Codec<CreateAssetUploadRequest>;
9432
9373
 
9433
9374
  export interface CreateAssetUploadResponse {
9434
9375
  /** A "completion" JWT which can be redeemed when creating a Worker version. */
9435
9376
  jwt?: string | null;
9436
9377
  }
9437
9378
 
9438
- export const CreateAssetUploadResponse =
9439
- /*@__PURE__*/ Schema.suspend(() =>
9440
- Schema.Struct({
9441
- jwt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
9442
- }).pipe(T.ResponsePath("result")),
9443
- ) as unknown as Schema.Codec<CreateAssetUploadResponse>;
9379
+ export const CreateAssetUploadResponse = /*@__PURE__*/ Schema.suspend(() =>
9380
+ Schema.Struct({
9381
+ jwt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
9382
+ }).pipe(T.ResponsePath("result")),
9383
+ ) as unknown as Schema.Codec<CreateAssetUploadResponse>;
9444
9384
 
9445
9385
  export type CreateAssetUploadError = DefaultErrors | InvalidRoute;
9446
9386
 
@@ -9520,25 +9460,24 @@ export interface ListBetaWorkersRequest {
9520
9460
  | (string & {});
9521
9461
  }
9522
9462
 
9523
- export const ListBetaWorkersRequest =
9524
- /*@__PURE__*/ Schema.suspend(() =>
9525
- Schema.Struct({
9526
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9527
- page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
9528
- perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
9529
- order: Schema.optional(
9530
- Schema.Union([Schema.Literals(["asc", "desc"]), Schema.String]),
9531
- ).pipe(T.HttpQuery("order")),
9532
- orderBy: Schema.optional(
9533
- Schema.Union([
9534
- Schema.Literals(["deployed_on", "updated_on", "created_on", "name"]),
9535
- Schema.String,
9536
- ]),
9537
- ).pipe(T.HttpQuery("order_by")),
9538
- }).pipe(
9539
- T.Http({ method: "GET", path: "/accounts/{account_id}/workers/workers" }),
9540
- ),
9541
- ) as unknown as Schema.Codec<ListBetaWorkersRequest>;
9463
+ export const ListBetaWorkersRequest = /*@__PURE__*/ Schema.suspend(() =>
9464
+ Schema.Struct({
9465
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9466
+ page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
9467
+ perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
9468
+ order: Schema.optional(
9469
+ Schema.Union([Schema.Literals(["asc", "desc"]), Schema.String]),
9470
+ ).pipe(T.HttpQuery("order")),
9471
+ orderBy: Schema.optional(
9472
+ Schema.Union([
9473
+ Schema.Literals(["deployed_on", "updated_on", "created_on", "name"]),
9474
+ Schema.String,
9475
+ ]),
9476
+ ).pipe(T.HttpQuery("order_by")),
9477
+ }).pipe(
9478
+ T.Http({ method: "GET", path: "/accounts/{account_id}/workers/workers" }),
9479
+ ),
9480
+ ) as unknown as Schema.Codec<ListBetaWorkersRequest>;
9542
9481
 
9543
9482
  export interface ListBetaWorkersResponse {
9544
9483
  result: { id: string; name: string }[];
@@ -9550,15 +9489,14 @@ export interface ListBetaWorkersResponse {
9550
9489
  } | null;
9551
9490
  }
9552
9491
 
9553
- export const ListBetaWorkersResponse =
9554
- /*@__PURE__*/ Schema.suspend(() =>
9555
- Schema.Struct({
9556
- result: Schema.Array(ListBetaWorkersResponseResult),
9557
- resultInfo: Schema.optional(
9558
- Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
9559
- ),
9560
- }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
9561
- ) as unknown as Schema.Codec<ListBetaWorkersResponse>;
9492
+ export const ListBetaWorkersResponse = /*@__PURE__*/ Schema.suspend(() =>
9493
+ Schema.Struct({
9494
+ result: Schema.Array(ListBetaWorkersResponseResult),
9495
+ resultInfo: Schema.optional(
9496
+ Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
9497
+ ),
9498
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
9499
+ ) as unknown as Schema.Codec<ListBetaWorkersResponse>;
9562
9500
 
9563
9501
  export type ListBetaWorkersError = DefaultErrors | InvalidRoute;
9564
9502
 
@@ -9614,31 +9552,27 @@ export interface CreateBetaWorkerRequest {
9614
9552
  tailConsumers?: { name: string }[];
9615
9553
  }
9616
9554
 
9617
- export const CreateBetaWorkerRequest =
9618
- /*@__PURE__*/ Schema.suspend(() =>
9619
- Schema.Struct({
9620
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9621
- name: Schema.String,
9622
- logpush: Schema.optional(Schema.Boolean),
9623
- observability: Schema.optional(Observability),
9624
- subdomain: Schema.optional(Subdomain),
9625
- tags: Schema.optional(Schema.Array(Schema.String)),
9626
- tailConsumers: Schema.optional(Schema.Array(TailConsumer)),
9627
- }).pipe(
9628
- Schema.encodeKeys({
9629
- name: "name",
9630
- logpush: "logpush",
9631
- observability: "observability",
9632
- subdomain: "subdomain",
9633
- tags: "tags",
9634
- tailConsumers: "tail_consumers",
9635
- }),
9636
- T.Http({
9637
- method: "POST",
9638
- path: "/accounts/{account_id}/workers/workers",
9639
- }),
9640
- ),
9641
- ) as unknown as Schema.Codec<CreateBetaWorkerRequest>;
9555
+ export const CreateBetaWorkerRequest = /*@__PURE__*/ Schema.suspend(() =>
9556
+ Schema.Struct({
9557
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9558
+ name: Schema.String,
9559
+ logpush: Schema.optional(Schema.Boolean),
9560
+ observability: Schema.optional(Observability),
9561
+ subdomain: Schema.optional(Subdomain),
9562
+ tags: Schema.optional(Schema.Array(Schema.String)),
9563
+ tailConsumers: Schema.optional(Schema.Array(TailConsumer)),
9564
+ }).pipe(
9565
+ Schema.encodeKeys({
9566
+ name: "name",
9567
+ logpush: "logpush",
9568
+ observability: "observability",
9569
+ subdomain: "subdomain",
9570
+ tags: "tags",
9571
+ tailConsumers: "tail_consumers",
9572
+ }),
9573
+ T.Http({ method: "POST", path: "/accounts/{account_id}/workers/workers" }),
9574
+ ),
9575
+ ) as unknown as Schema.Codec<CreateBetaWorkerRequest>;
9642
9576
 
9643
9577
  export interface CreateBetaWorkerResponse {
9644
9578
  /** ID of the referencing Worker. */
@@ -9647,13 +9581,12 @@ export interface CreateBetaWorkerResponse {
9647
9581
  name: string;
9648
9582
  }
9649
9583
 
9650
- export const CreateBetaWorkerResponse =
9651
- /*@__PURE__*/ Schema.suspend(() =>
9652
- Schema.Struct({
9653
- id: Schema.String,
9654
- name: Schema.String,
9655
- }).pipe(T.ResponsePath("result")),
9656
- ) as unknown as Schema.Codec<CreateBetaWorkerResponse>;
9584
+ export const CreateBetaWorkerResponse = /*@__PURE__*/ Schema.suspend(() =>
9585
+ Schema.Struct({
9586
+ id: Schema.String,
9587
+ name: Schema.String,
9588
+ }).pipe(T.ResponsePath("result")),
9589
+ ) as unknown as Schema.Codec<CreateBetaWorkerResponse>;
9657
9590
 
9658
9591
  export type CreateBetaWorkerError = DefaultErrors | InvalidRoute;
9659
9592
 
@@ -9703,32 +9636,31 @@ export interface UpdateBetaWorkerRequest {
9703
9636
  tailConsumers?: { name: string }[];
9704
9637
  }
9705
9638
 
9706
- export const UpdateBetaWorkerRequest =
9707
- /*@__PURE__*/ Schema.suspend(() =>
9708
- Schema.Struct({
9709
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
9710
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9711
- name: Schema.String,
9712
- logpush: Schema.optional(Schema.Boolean),
9713
- observability: Schema.optional(Observability),
9714
- subdomain: Schema.optional(Subdomain),
9715
- tags: Schema.optional(Schema.Array(Schema.String)),
9716
- tailConsumers: Schema.optional(Schema.Array(TailConsumer)),
9717
- }).pipe(
9718
- Schema.encodeKeys({
9719
- name: "name",
9720
- logpush: "logpush",
9721
- observability: "observability",
9722
- subdomain: "subdomain",
9723
- tags: "tags",
9724
- tailConsumers: "tail_consumers",
9725
- }),
9726
- T.Http({
9727
- method: "PUT",
9728
- path: "/accounts/{account_id}/workers/workers/{workerId}",
9729
- }),
9730
- ),
9731
- ) as unknown as Schema.Codec<UpdateBetaWorkerRequest>;
9639
+ export const UpdateBetaWorkerRequest = /*@__PURE__*/ Schema.suspend(() =>
9640
+ Schema.Struct({
9641
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
9642
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9643
+ name: Schema.String,
9644
+ logpush: Schema.optional(Schema.Boolean),
9645
+ observability: Schema.optional(Observability),
9646
+ subdomain: Schema.optional(Subdomain),
9647
+ tags: Schema.optional(Schema.Array(Schema.String)),
9648
+ tailConsumers: Schema.optional(Schema.Array(TailConsumer)),
9649
+ }).pipe(
9650
+ Schema.encodeKeys({
9651
+ name: "name",
9652
+ logpush: "logpush",
9653
+ observability: "observability",
9654
+ subdomain: "subdomain",
9655
+ tags: "tags",
9656
+ tailConsumers: "tail_consumers",
9657
+ }),
9658
+ T.Http({
9659
+ method: "PUT",
9660
+ path: "/accounts/{account_id}/workers/workers/{workerId}",
9661
+ }),
9662
+ ),
9663
+ ) as unknown as Schema.Codec<UpdateBetaWorkerRequest>;
9732
9664
 
9733
9665
  export interface UpdateBetaWorkerResponse {
9734
9666
  /** ID of the referencing Worker. */
@@ -9737,13 +9669,12 @@ export interface UpdateBetaWorkerResponse {
9737
9669
  name: string;
9738
9670
  }
9739
9671
 
9740
- export const UpdateBetaWorkerResponse =
9741
- /*@__PURE__*/ Schema.suspend(() =>
9742
- Schema.Struct({
9743
- id: Schema.String,
9744
- name: Schema.String,
9745
- }).pipe(T.ResponsePath("result")),
9746
- ) as unknown as Schema.Codec<UpdateBetaWorkerResponse>;
9672
+ export const UpdateBetaWorkerResponse = /*@__PURE__*/ Schema.suspend(() =>
9673
+ Schema.Struct({
9674
+ id: Schema.String,
9675
+ name: Schema.String,
9676
+ }).pipe(T.ResponsePath("result")),
9677
+ ) as unknown as Schema.Codec<UpdateBetaWorkerResponse>;
9747
9678
 
9748
9679
  export type UpdateBetaWorkerError = DefaultErrors | WorkerNotFound;
9749
9680
 
@@ -9793,32 +9724,31 @@ export interface PatchBetaWorkerRequest {
9793
9724
  tailConsumers: { name: string }[];
9794
9725
  }
9795
9726
 
9796
- export const PatchBetaWorkerRequest =
9797
- /*@__PURE__*/ Schema.suspend(() =>
9798
- Schema.Struct({
9799
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
9800
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9801
- logpush: Schema.Boolean,
9802
- name: Schema.String,
9803
- observability: Observability,
9804
- subdomain: Subdomain,
9805
- tags: Schema.Array(Schema.String),
9806
- tailConsumers: Schema.Array(TailConsumer),
9807
- }).pipe(
9808
- Schema.encodeKeys({
9809
- logpush: "logpush",
9810
- name: "name",
9811
- observability: "observability",
9812
- subdomain: "subdomain",
9813
- tags: "tags",
9814
- tailConsumers: "tail_consumers",
9815
- }),
9816
- T.Http({
9817
- method: "PATCH",
9818
- path: "/accounts/{account_id}/workers/workers/{workerId}",
9819
- }),
9820
- ),
9821
- ) as unknown as Schema.Codec<PatchBetaWorkerRequest>;
9727
+ export const PatchBetaWorkerRequest = /*@__PURE__*/ Schema.suspend(() =>
9728
+ Schema.Struct({
9729
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
9730
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9731
+ logpush: Schema.Boolean,
9732
+ name: Schema.String,
9733
+ observability: Observability,
9734
+ subdomain: Subdomain,
9735
+ tags: Schema.Array(Schema.String),
9736
+ tailConsumers: Schema.Array(TailConsumer),
9737
+ }).pipe(
9738
+ Schema.encodeKeys({
9739
+ logpush: "logpush",
9740
+ name: "name",
9741
+ observability: "observability",
9742
+ subdomain: "subdomain",
9743
+ tags: "tags",
9744
+ tailConsumers: "tail_consumers",
9745
+ }),
9746
+ T.Http({
9747
+ method: "PATCH",
9748
+ path: "/accounts/{account_id}/workers/workers/{workerId}",
9749
+ }),
9750
+ ),
9751
+ ) as unknown as Schema.Codec<PatchBetaWorkerRequest>;
9822
9752
 
9823
9753
  export interface PatchBetaWorkerResponse {
9824
9754
  /** ID of the referencing Worker. */
@@ -9827,13 +9757,12 @@ export interface PatchBetaWorkerResponse {
9827
9757
  name: string;
9828
9758
  }
9829
9759
 
9830
- export const PatchBetaWorkerResponse =
9831
- /*@__PURE__*/ Schema.suspend(() =>
9832
- Schema.Struct({
9833
- id: Schema.String,
9834
- name: Schema.String,
9835
- }).pipe(T.ResponsePath("result")),
9836
- ) as unknown as Schema.Codec<PatchBetaWorkerResponse>;
9760
+ export const PatchBetaWorkerResponse = /*@__PURE__*/ Schema.suspend(() =>
9761
+ Schema.Struct({
9762
+ id: Schema.String,
9763
+ name: Schema.String,
9764
+ }).pipe(T.ResponsePath("result")),
9765
+ ) as unknown as Schema.Codec<PatchBetaWorkerResponse>;
9837
9766
 
9838
9767
  export type PatchBetaWorkerError = DefaultErrors | WorkerNotFound;
9839
9768
 
@@ -9854,18 +9783,17 @@ export interface DeleteBetaWorkerRequest {
9854
9783
  accountId: string;
9855
9784
  }
9856
9785
 
9857
- export const DeleteBetaWorkerRequest =
9858
- /*@__PURE__*/ Schema.suspend(() =>
9859
- Schema.Struct({
9860
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
9861
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9862
- }).pipe(
9863
- T.Http({
9864
- method: "DELETE",
9865
- path: "/accounts/{account_id}/workers/workers/{workerId}",
9866
- }),
9867
- ),
9868
- ) as unknown as Schema.Codec<DeleteBetaWorkerRequest>;
9786
+ export const DeleteBetaWorkerRequest = /*@__PURE__*/ Schema.suspend(() =>
9787
+ Schema.Struct({
9788
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
9789
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9790
+ }).pipe(
9791
+ T.Http({
9792
+ method: "DELETE",
9793
+ path: "/accounts/{account_id}/workers/workers/{workerId}",
9794
+ }),
9795
+ ),
9796
+ ) as unknown as Schema.Codec<DeleteBetaWorkerRequest>;
9869
9797
 
9870
9798
  export interface DeleteBetaWorkerResponse {
9871
9799
  errors: {
@@ -9884,14 +9812,13 @@ export interface DeleteBetaWorkerResponse {
9884
9812
  success: true;
9885
9813
  }
9886
9814
 
9887
- export const DeleteBetaWorkerResponse =
9888
- /*@__PURE__*/ Schema.suspend(() =>
9889
- Schema.Struct({
9890
- errors: Schema.Array(Error2),
9891
- messages: Schema.Array(Error2),
9892
- success: Schema.Literal(true),
9893
- }),
9894
- ) as unknown as Schema.Codec<DeleteBetaWorkerResponse>;
9815
+ export const DeleteBetaWorkerResponse = /*@__PURE__*/ Schema.suspend(() =>
9816
+ Schema.Struct({
9817
+ errors: Schema.Array(Error2),
9818
+ messages: Schema.Array(Error2),
9819
+ success: Schema.Literal(true),
9820
+ }),
9821
+ ) as unknown as Schema.Codec<DeleteBetaWorkerResponse>;
9895
9822
 
9896
9823
  export type DeleteBetaWorkerError = DefaultErrors | WorkerNotFound;
9897
9824
 
@@ -9919,22 +9846,21 @@ export interface GetBetaWorkerVersionRequest {
9919
9846
  include?: "modules";
9920
9847
  }
9921
9848
 
9922
- export const GetBetaWorkerVersionRequest =
9923
- /*@__PURE__*/ Schema.suspend(() =>
9924
- Schema.Struct({
9925
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
9926
- versionId: Schema.String.pipe(T.HttpPath("versionId")),
9927
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
9928
- include: Schema.optional(Schema.Literal("modules")).pipe(
9929
- T.HttpQuery("include"),
9930
- ),
9931
- }).pipe(
9932
- T.Http({
9933
- method: "GET",
9934
- path: "/accounts/{account_id}/workers/workers/{workerId}/versions/{versionId}",
9935
- }),
9849
+ export const GetBetaWorkerVersionRequest = /*@__PURE__*/ Schema.suspend(() =>
9850
+ Schema.Struct({
9851
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
9852
+ versionId: Schema.String.pipe(T.HttpPath("versionId")),
9853
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
9854
+ include: Schema.optional(Schema.Literal("modules")).pipe(
9855
+ T.HttpQuery("include"),
9936
9856
  ),
9937
- ) as unknown as Schema.Codec<GetBetaWorkerVersionRequest>;
9857
+ }).pipe(
9858
+ T.Http({
9859
+ method: "GET",
9860
+ path: "/accounts/{account_id}/workers/workers/{workerId}/versions/{versionId}",
9861
+ }),
9862
+ ),
9863
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionRequest>;
9938
9864
 
9939
9865
  export interface GetBetaWorkerVersionResponse {
9940
9866
  /** Version identifier. */
@@ -10173,136 +10099,131 @@ export interface GetBetaWorkerVersionResponse {
10173
10099
  usageModel?: "standard" | "bundled" | "unbound" | (string & {}) | null;
10174
10100
  }
10175
10101
 
10176
- export const GetBetaWorkerVersionResponse =
10177
- /*@__PURE__*/ Schema.suspend(() =>
10178
- Schema.Struct({
10179
- id: Schema.String,
10180
- createdOn: Schema.String,
10181
- number: Schema.Number,
10182
- urls: Schema.Array(Schema.String),
10183
- annotations: Schema.optional(Schema.Union([Annotations, Schema.Null])),
10184
- assets: Schema.optional(Schema.Union([Assets, Schema.Null])),
10185
- bindings: Schema.optional(
10186
- Schema.Union([
10187
- Schema.Array(
10188
- Schema.Union([
10189
- WorkersBindingKindSecretKey,
10190
- WorkersBindingKindRatelimit,
10191
- WorkersBindingKindSecretsStoreSecret,
10192
- WorkersBindingKindAISearch,
10193
- WorkersBindingKindAISearchNamespace,
10194
- WorkersBindingKindAnalyticsEngine,
10195
- WorkersBindingKindD1,
10196
- WorkersBindingKindDataBlob,
10197
- WorkersBindingKindDispatchNamespace,
10198
- WorkersBindingKindHyperdrive,
10199
- WorkersBindingKindJson,
10200
- WorkersBindingKindKVNamespace,
10201
- WorkersBindingKindMTLSCertificate,
10202
- WorkersBindingKindPlainText,
10203
- WorkersBindingKindPipelines,
10204
- WorkersBindingKindQueue,
10205
- WorkersBindingKindR2Bucket,
10206
- WorkersBindingKindService,
10207
- WorkersBindingKindTextBlob,
10208
- WorkersBindingKindVectorize,
10209
- WorkersBindingKindFlagship,
10210
- WorkersBindingKindWorkflow,
10211
- WorkersBindingKindWasmModule,
10212
- WorkersBindingKindVPCService,
10213
- GetBetaWorkerVersionResponseBinding36,
10214
- WorkersBindingKindAI,
10215
- WorkersBindingKindAssets,
10216
- WorkersBindingKindBrowser,
10217
- WorkersBindingKindDurableObjectNamespace,
10218
- WorkersBindingKindInherit,
10219
- WorkersBindingKindImages,
10220
- WorkersBindingKindMedia,
10221
- WorkersBindingKindSecretText,
10222
- WorkersBindingKindSendEmail,
10223
- WorkersBindingKindVersionMetadata,
10224
- WorkersBindingKindVPCNetwork,
10225
- GetBetaWorkerVersionResponseBinding35,
10226
- ]),
10227
- ),
10228
- Schema.Null,
10229
- ]),
10230
- ),
10231
- compatibilityDate: Schema.optional(
10232
- Schema.Union([Schema.String, Schema.Null]),
10233
- ),
10234
- compatibilityFlags: Schema.optional(
10235
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
10236
- ),
10237
- containers: Schema.optional(
10238
- Schema.Union([Schema.Array(Container), Schema.Null]),
10239
- ),
10240
- limits: Schema.optional(Schema.Union([Limits, Schema.Null])),
10241
- mainModule: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10242
- migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10243
- migrations: Schema.optional(
10244
- Schema.Union([
10245
- Schema.Union([Schema.Unknown, WorkersMultipleStepMigrations]),
10246
- Schema.Null,
10247
- ]),
10248
- ),
10249
- modules: Schema.optional(
10250
- Schema.Union([Schema.Array(Module), Schema.Null]),
10251
- ),
10252
- placement: Schema.optional(
10253
- Schema.Union([
10102
+ export const GetBetaWorkerVersionResponse = /*@__PURE__*/ Schema.suspend(() =>
10103
+ Schema.Struct({
10104
+ id: Schema.String,
10105
+ createdOn: Schema.String,
10106
+ number: Schema.Number,
10107
+ urls: Schema.Array(Schema.String),
10108
+ annotations: Schema.optional(Schema.Union([Annotations, Schema.Null])),
10109
+ assets: Schema.optional(Schema.Union([Assets, Schema.Null])),
10110
+ bindings: Schema.optional(
10111
+ Schema.Union([
10112
+ Schema.Array(
10254
10113
  Schema.Union([
10255
- GetBetaWorkerVersionResponsePlacement4,
10256
- GetBetaWorkerVersionResponsePlacement5,
10257
- GetBetaWorkerVersionResponsePlacement6,
10258
- GetBetaWorkerVersionResponsePlacement7,
10259
- Mode,
10260
- Region,
10261
- Hostname,
10262
- Host,
10114
+ WorkersBindingKindSecretKey,
10115
+ WorkersBindingKindRatelimit,
10116
+ WorkersBindingKindSecretsStoreSecret,
10117
+ WorkersBindingKindAISearch,
10118
+ WorkersBindingKindAISearchNamespace,
10119
+ WorkersBindingKindAnalyticsEngine,
10120
+ WorkersBindingKindD1,
10121
+ WorkersBindingKindDataBlob,
10122
+ WorkersBindingKindDispatchNamespace,
10123
+ WorkersBindingKindHyperdrive,
10124
+ WorkersBindingKindJson,
10125
+ WorkersBindingKindKVNamespace,
10126
+ WorkersBindingKindMTLSCertificate,
10127
+ WorkersBindingKindPlainText,
10128
+ WorkersBindingKindPipelines,
10129
+ WorkersBindingKindQueue,
10130
+ WorkersBindingKindR2Bucket,
10131
+ WorkersBindingKindService,
10132
+ WorkersBindingKindTextBlob,
10133
+ WorkersBindingKindVectorize,
10134
+ WorkersBindingKindFlagship,
10135
+ WorkersBindingKindWorkflow,
10136
+ WorkersBindingKindWasmModule,
10137
+ WorkersBindingKindVPCService,
10138
+ GetBetaWorkerVersionResponseBinding36,
10139
+ WorkersBindingKindAI,
10140
+ WorkersBindingKindAssets,
10141
+ WorkersBindingKindBrowser,
10142
+ WorkersBindingKindDurableObjectNamespace,
10143
+ WorkersBindingKindInherit,
10144
+ WorkersBindingKindImages,
10145
+ WorkersBindingKindMedia,
10146
+ WorkersBindingKindSecretText,
10147
+ WorkersBindingKindSendEmail,
10148
+ WorkersBindingKindVersionMetadata,
10149
+ WorkersBindingKindVPCNetwork,
10150
+ GetBetaWorkerVersionResponseBinding35,
10263
10151
  ]),
10264
- Schema.Null,
10152
+ ),
10153
+ Schema.Null,
10154
+ ]),
10155
+ ),
10156
+ compatibilityDate: Schema.optional(
10157
+ Schema.Union([Schema.String, Schema.Null]),
10158
+ ),
10159
+ compatibilityFlags: Schema.optional(
10160
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
10161
+ ),
10162
+ containers: Schema.optional(
10163
+ Schema.Union([Schema.Array(Container), Schema.Null]),
10164
+ ),
10165
+ limits: Schema.optional(Schema.Union([Limits, Schema.Null])),
10166
+ mainModule: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10167
+ migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10168
+ migrations: Schema.optional(
10169
+ Schema.Union([
10170
+ Schema.Union([Schema.Unknown, WorkersMultipleStepMigrations]),
10171
+ Schema.Null,
10172
+ ]),
10173
+ ),
10174
+ modules: Schema.optional(Schema.Union([Schema.Array(Module), Schema.Null])),
10175
+ placement: Schema.optional(
10176
+ Schema.Union([
10177
+ Schema.Union([
10178
+ GetBetaWorkerVersionResponsePlacement4,
10179
+ GetBetaWorkerVersionResponsePlacement5,
10180
+ GetBetaWorkerVersionResponsePlacement6,
10181
+ GetBetaWorkerVersionResponsePlacement7,
10182
+ Mode,
10183
+ Region,
10184
+ Hostname,
10185
+ Host,
10265
10186
  ]),
10266
- ),
10267
- source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10268
- startupTimeMs: Schema.optional(
10269
- Schema.Union([Schema.Number, Schema.Null]),
10270
- ),
10271
- usageModel: Schema.optional(
10187
+ Schema.Null,
10188
+ ]),
10189
+ ),
10190
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10191
+ startupTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
10192
+ usageModel: Schema.optional(
10193
+ Schema.Union([
10272
10194
  Schema.Union([
10273
- Schema.Union([
10274
- Schema.Literals(["standard", "bundled", "unbound"]),
10275
- Schema.String,
10276
- ]),
10277
- Schema.Null,
10195
+ Schema.Literals(["standard", "bundled", "unbound"]),
10196
+ Schema.String,
10278
10197
  ]),
10279
- ),
10280
- })
10281
- .pipe(
10282
- Schema.encodeKeys({
10283
- id: "id",
10284
- createdOn: "created_on",
10285
- number: "number",
10286
- urls: "urls",
10287
- annotations: "annotations",
10288
- assets: "assets",
10289
- bindings: "bindings",
10290
- compatibilityDate: "compatibility_date",
10291
- compatibilityFlags: "compatibility_flags",
10292
- containers: "containers",
10293
- limits: "limits",
10294
- mainModule: "main_module",
10295
- migrationTag: "migration_tag",
10296
- migrations: "migrations",
10297
- modules: "modules",
10298
- placement: "placement",
10299
- source: "source",
10300
- startupTimeMs: "startup_time_ms",
10301
- usageModel: "usage_model",
10302
- }),
10303
- )
10304
- .pipe(T.ResponsePath("result")),
10305
- ) as unknown as Schema.Codec<GetBetaWorkerVersionResponse>;
10198
+ Schema.Null,
10199
+ ]),
10200
+ ),
10201
+ })
10202
+ .pipe(
10203
+ Schema.encodeKeys({
10204
+ id: "id",
10205
+ createdOn: "created_on",
10206
+ number: "number",
10207
+ urls: "urls",
10208
+ annotations: "annotations",
10209
+ assets: "assets",
10210
+ bindings: "bindings",
10211
+ compatibilityDate: "compatibility_date",
10212
+ compatibilityFlags: "compatibility_flags",
10213
+ containers: "containers",
10214
+ limits: "limits",
10215
+ mainModule: "main_module",
10216
+ migrationTag: "migration_tag",
10217
+ migrations: "migrations",
10218
+ modules: "modules",
10219
+ placement: "placement",
10220
+ source: "source",
10221
+ startupTimeMs: "startup_time_ms",
10222
+ usageModel: "usage_model",
10223
+ }),
10224
+ )
10225
+ .pipe(T.ResponsePath("result")),
10226
+ ) as unknown as Schema.Codec<GetBetaWorkerVersionResponse>;
10306
10227
 
10307
10228
  export type GetBetaWorkerVersionError =
10308
10229
  | DefaultErrors
@@ -10328,20 +10249,19 @@ export interface ListBetaWorkerVersionsRequest {
10328
10249
  perPage?: number;
10329
10250
  }
10330
10251
 
10331
- export const ListBetaWorkerVersionsRequest =
10332
- /*@__PURE__*/ Schema.suspend(() =>
10333
- Schema.Struct({
10334
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
10335
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
10336
- page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
10337
- perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
10338
- }).pipe(
10339
- T.Http({
10340
- method: "GET",
10341
- path: "/accounts/{account_id}/workers/workers/{workerId}/versions",
10342
- }),
10343
- ),
10344
- ) as unknown as Schema.Codec<ListBetaWorkerVersionsRequest>;
10252
+ export const ListBetaWorkerVersionsRequest = /*@__PURE__*/ Schema.suspend(() =>
10253
+ Schema.Struct({
10254
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
10255
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
10256
+ page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
10257
+ perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
10258
+ }).pipe(
10259
+ T.Http({
10260
+ method: "GET",
10261
+ path: "/accounts/{account_id}/workers/workers/{workerId}/versions",
10262
+ }),
10263
+ ),
10264
+ ) as unknown as Schema.Codec<ListBetaWorkerVersionsRequest>;
10345
10265
 
10346
10266
  export interface ListBetaWorkerVersionsResponse {
10347
10267
  result: {
@@ -10569,15 +10489,14 @@ export interface ListBetaWorkerVersionsResponse {
10569
10489
  } | null;
10570
10490
  }
10571
10491
 
10572
- export const ListBetaWorkerVersionsResponse =
10573
- /*@__PURE__*/ Schema.suspend(() =>
10574
- Schema.Struct({
10575
- result: Schema.Array(ListBetaWorkerVersionsResponseResult),
10576
- resultInfo: Schema.optional(
10577
- Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
10578
- ),
10579
- }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
10580
- ) as unknown as Schema.Codec<ListBetaWorkerVersionsResponse>;
10492
+ export const ListBetaWorkerVersionsResponse = /*@__PURE__*/ Schema.suspend(() =>
10493
+ Schema.Struct({
10494
+ result: Schema.Array(ListBetaWorkerVersionsResponseResult),
10495
+ resultInfo: Schema.optional(
10496
+ Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
10497
+ ),
10498
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
10499
+ ) as unknown as Schema.Codec<ListBetaWorkerVersionsResponse>;
10581
10500
 
10582
10501
  export type ListBetaWorkerVersionsError = DefaultErrors | WorkerNotFound;
10583
10502
 
@@ -10809,105 +10728,104 @@ export interface CreateBetaWorkerVersionRequest {
10809
10728
  usageModel?: "standard" | "bundled" | "unbound" | (string & {});
10810
10729
  }
10811
10730
 
10812
- export const CreateBetaWorkerVersionRequest =
10813
- /*@__PURE__*/ Schema.suspend(() =>
10814
- Schema.Struct({
10815
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
10816
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
10817
- deploy: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("deploy")),
10818
- annotations: Schema.optional(Annotations2),
10819
- assets: Schema.optional(Assets),
10820
- bindings: Schema.optional(
10821
- Schema.Array(
10822
- Schema.Union([
10823
- WorkersBindingKindSecretKey2,
10824
- WorkersBindingKindRatelimit,
10825
- WorkersBindingKindSecretsStoreSecret,
10826
- WorkersBindingKindWorkflow2,
10827
- WorkersBindingKindAISearch,
10828
- WorkersBindingKindAISearchNamespace,
10829
- WorkersBindingKindAnalyticsEngine,
10830
- WorkersBindingKindD1,
10831
- WorkersBindingKindDataBlob,
10832
- WorkersBindingKindDispatchNamespace,
10833
- WorkersBindingKindDurableObjectNamespace2,
10834
- WorkersBindingKindHyperdrive,
10835
- WorkersBindingKindJson,
10836
- WorkersBindingKindKVNamespace,
10837
- WorkersBindingKindMTLSCertificate,
10838
- WorkersBindingKindPlainText,
10839
- WorkersBindingKindPipelines,
10840
- WorkersBindingKindQueue,
10841
- WorkersBindingKindR2Bucket,
10842
- WorkersBindingKindSecretText2,
10843
- WorkersBindingKindService,
10844
- WorkersBindingKindTextBlob,
10845
- WorkersBindingKindVectorize,
10846
- WorkersBindingKindFlagship,
10847
- WorkersBindingKindWasmModule,
10848
- WorkersBindingKindVPCService,
10849
- GetBetaWorkerVersionResponseBinding36,
10850
- WorkersBindingKindAI,
10851
- WorkersBindingKindAssets,
10852
- WorkersBindingKindBrowser,
10853
- WorkersBindingKindInherit,
10854
- WorkersBindingKindImages,
10855
- WorkersBindingKindMedia,
10856
- WorkersBindingKindSendEmail,
10857
- WorkersBindingKindVersionMetadata,
10858
- WorkersBindingKindVPCNetwork,
10859
- GetBetaWorkerVersionResponseBinding35,
10860
- ]),
10861
- ),
10862
- ),
10863
- compatibilityDate: Schema.optional(Schema.String),
10864
- compatibilityFlags: Schema.optional(Schema.Array(Schema.String)),
10865
- containers: Schema.optional(Schema.Array(Container)),
10866
- limits: Schema.optional(Limits),
10867
- mainModule: Schema.optional(Schema.String),
10868
- migrations: Schema.optional(
10869
- Schema.Union([SingleStepMigrationParam, WorkersMultipleStepMigrations]),
10870
- ),
10871
- modules: Schema.optional(Schema.Array(Module)),
10872
- placement: Schema.optional(
10873
- Schema.Union([
10874
- GetBetaWorkerVersionResponsePlacement4,
10875
- GetBetaWorkerVersionResponsePlacement5,
10876
- GetBetaWorkerVersionResponsePlacement6,
10877
- GetBetaWorkerVersionResponsePlacement7,
10878
- Mode,
10879
- Region,
10880
- Hostname,
10881
- Host,
10882
- ]),
10883
- ),
10884
- usageModel: Schema.optional(
10731
+ export const CreateBetaWorkerVersionRequest = /*@__PURE__*/ Schema.suspend(() =>
10732
+ Schema.Struct({
10733
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
10734
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
10735
+ deploy: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("deploy")),
10736
+ annotations: Schema.optional(Annotations2),
10737
+ assets: Schema.optional(Assets),
10738
+ bindings: Schema.optional(
10739
+ Schema.Array(
10885
10740
  Schema.Union([
10886
- Schema.Literals(["standard", "bundled", "unbound"]),
10887
- Schema.String,
10741
+ WorkersBindingKindSecretKey2,
10742
+ WorkersBindingKindRatelimit,
10743
+ WorkersBindingKindSecretsStoreSecret,
10744
+ WorkersBindingKindWorkflow2,
10745
+ WorkersBindingKindAISearch,
10746
+ WorkersBindingKindAISearchNamespace,
10747
+ WorkersBindingKindAnalyticsEngine,
10748
+ WorkersBindingKindD1,
10749
+ WorkersBindingKindDataBlob,
10750
+ WorkersBindingKindDispatchNamespace,
10751
+ WorkersBindingKindDurableObjectNamespace2,
10752
+ WorkersBindingKindHyperdrive,
10753
+ WorkersBindingKindJson,
10754
+ WorkersBindingKindKVNamespace,
10755
+ WorkersBindingKindMTLSCertificate,
10756
+ WorkersBindingKindPlainText,
10757
+ WorkersBindingKindPipelines,
10758
+ WorkersBindingKindQueue,
10759
+ WorkersBindingKindR2Bucket,
10760
+ WorkersBindingKindSecretText2,
10761
+ WorkersBindingKindService,
10762
+ WorkersBindingKindTextBlob,
10763
+ WorkersBindingKindVectorize,
10764
+ WorkersBindingKindFlagship,
10765
+ WorkersBindingKindWasmModule,
10766
+ WorkersBindingKindVPCService,
10767
+ GetBetaWorkerVersionResponseBinding36,
10768
+ WorkersBindingKindAI,
10769
+ WorkersBindingKindAssets,
10770
+ WorkersBindingKindBrowser,
10771
+ WorkersBindingKindInherit,
10772
+ WorkersBindingKindImages,
10773
+ WorkersBindingKindMedia,
10774
+ WorkersBindingKindSendEmail,
10775
+ WorkersBindingKindVersionMetadata,
10776
+ WorkersBindingKindVPCNetwork,
10777
+ GetBetaWorkerVersionResponseBinding35,
10888
10778
  ]),
10889
10779
  ),
10890
- }).pipe(
10891
- Schema.encodeKeys({
10892
- annotations: "annotations",
10893
- assets: "assets",
10894
- bindings: "bindings",
10895
- compatibilityDate: "compatibility_date",
10896
- compatibilityFlags: "compatibility_flags",
10897
- containers: "containers",
10898
- limits: "limits",
10899
- mainModule: "main_module",
10900
- migrations: "migrations",
10901
- modules: "modules",
10902
- placement: "placement",
10903
- usageModel: "usage_model",
10904
- }),
10905
- T.Http({
10906
- method: "POST",
10907
- path: "/accounts/{account_id}/workers/workers/{workerId}/versions",
10908
- }),
10909
10780
  ),
10910
- ) as unknown as Schema.Codec<CreateBetaWorkerVersionRequest>;
10781
+ compatibilityDate: Schema.optional(Schema.String),
10782
+ compatibilityFlags: Schema.optional(Schema.Array(Schema.String)),
10783
+ containers: Schema.optional(Schema.Array(Container)),
10784
+ limits: Schema.optional(Limits),
10785
+ mainModule: Schema.optional(Schema.String),
10786
+ migrations: Schema.optional(
10787
+ Schema.Union([SingleStepMigrationParam, WorkersMultipleStepMigrations]),
10788
+ ),
10789
+ modules: Schema.optional(Schema.Array(Module)),
10790
+ placement: Schema.optional(
10791
+ Schema.Union([
10792
+ GetBetaWorkerVersionResponsePlacement4,
10793
+ GetBetaWorkerVersionResponsePlacement5,
10794
+ GetBetaWorkerVersionResponsePlacement6,
10795
+ GetBetaWorkerVersionResponsePlacement7,
10796
+ Mode,
10797
+ Region,
10798
+ Hostname,
10799
+ Host,
10800
+ ]),
10801
+ ),
10802
+ usageModel: Schema.optional(
10803
+ Schema.Union([
10804
+ Schema.Literals(["standard", "bundled", "unbound"]),
10805
+ Schema.String,
10806
+ ]),
10807
+ ),
10808
+ }).pipe(
10809
+ Schema.encodeKeys({
10810
+ annotations: "annotations",
10811
+ assets: "assets",
10812
+ bindings: "bindings",
10813
+ compatibilityDate: "compatibility_date",
10814
+ compatibilityFlags: "compatibility_flags",
10815
+ containers: "containers",
10816
+ limits: "limits",
10817
+ mainModule: "main_module",
10818
+ migrations: "migrations",
10819
+ modules: "modules",
10820
+ placement: "placement",
10821
+ usageModel: "usage_model",
10822
+ }),
10823
+ T.Http({
10824
+ method: "POST",
10825
+ path: "/accounts/{account_id}/workers/workers/{workerId}/versions",
10826
+ }),
10827
+ ),
10828
+ ) as unknown as Schema.Codec<CreateBetaWorkerVersionRequest>;
10911
10829
 
10912
10830
  export interface CreateBetaWorkerVersionResponse {
10913
10831
  /** Version identifier. */
@@ -11146,8 +11064,8 @@ export interface CreateBetaWorkerVersionResponse {
11146
11064
  usageModel?: "standard" | "bundled" | "unbound" | (string & {}) | null;
11147
11065
  }
11148
11066
 
11149
- export const CreateBetaWorkerVersionResponse =
11150
- /*@__PURE__*/ Schema.suspend(() =>
11067
+ export const CreateBetaWorkerVersionResponse = /*@__PURE__*/ Schema.suspend(
11068
+ () =>
11151
11069
  Schema.Struct({
11152
11070
  id: Schema.String,
11153
11071
  createdOn: Schema.String,
@@ -11275,7 +11193,7 @@ export const CreateBetaWorkerVersionResponse =
11275
11193
  }),
11276
11194
  )
11277
11195
  .pipe(T.ResponsePath("result")),
11278
- ) as unknown as Schema.Codec<CreateBetaWorkerVersionResponse>;
11196
+ ) as unknown as Schema.Codec<CreateBetaWorkerVersionResponse>;
11279
11197
 
11280
11198
  export type CreateBetaWorkerVersionError = DefaultErrors | WorkerNotFound;
11281
11199
 
@@ -11297,19 +11215,18 @@ export interface DeleteBetaWorkerVersionRequest {
11297
11215
  accountId: string;
11298
11216
  }
11299
11217
 
11300
- export const DeleteBetaWorkerVersionRequest =
11301
- /*@__PURE__*/ Schema.suspend(() =>
11302
- Schema.Struct({
11303
- workerId: Schema.String.pipe(T.HttpPath("workerId")),
11304
- versionId: Schema.String.pipe(T.HttpPath("versionId")),
11305
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
11306
- }).pipe(
11307
- T.Http({
11308
- method: "DELETE",
11309
- path: "/accounts/{account_id}/workers/workers/{workerId}/versions/{versionId}",
11310
- }),
11311
- ),
11312
- ) as unknown as Schema.Codec<DeleteBetaWorkerVersionRequest>;
11218
+ export const DeleteBetaWorkerVersionRequest = /*@__PURE__*/ Schema.suspend(() =>
11219
+ Schema.Struct({
11220
+ workerId: Schema.String.pipe(T.HttpPath("workerId")),
11221
+ versionId: Schema.String.pipe(T.HttpPath("versionId")),
11222
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
11223
+ }).pipe(
11224
+ T.Http({
11225
+ method: "DELETE",
11226
+ path: "/accounts/{account_id}/workers/workers/{workerId}/versions/{versionId}",
11227
+ }),
11228
+ ),
11229
+ ) as unknown as Schema.Codec<DeleteBetaWorkerVersionRequest>;
11313
11230
 
11314
11231
  export interface DeleteBetaWorkerVersionResponse {
11315
11232
  errors: {
@@ -11328,14 +11245,14 @@ export interface DeleteBetaWorkerVersionResponse {
11328
11245
  success: true;
11329
11246
  }
11330
11247
 
11331
- export const DeleteBetaWorkerVersionResponse =
11332
- /*@__PURE__*/ Schema.suspend(() =>
11248
+ export const DeleteBetaWorkerVersionResponse = /*@__PURE__*/ Schema.suspend(
11249
+ () =>
11333
11250
  Schema.Struct({
11334
11251
  errors: Schema.Array(Error2),
11335
11252
  messages: Schema.Array(Error2),
11336
11253
  success: Schema.Literal(true),
11337
11254
  }),
11338
- ) as unknown as Schema.Codec<DeleteBetaWorkerVersionResponse>;
11255
+ ) as unknown as Schema.Codec<DeleteBetaWorkerVersionResponse>;
11339
11256
 
11340
11257
  export type DeleteBetaWorkerVersionError =
11341
11258
  | DefaultErrors
@@ -11972,8 +11889,8 @@ export interface ListObservabilityQueriesRequest {
11972
11889
  perPage?: number;
11973
11890
  }
11974
11891
 
11975
- export const ListObservabilityQueriesRequest =
11976
- /*@__PURE__*/ Schema.suspend(() =>
11892
+ export const ListObservabilityQueriesRequest = /*@__PURE__*/ Schema.suspend(
11893
+ () =>
11977
11894
  Schema.Struct({
11978
11895
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
11979
11896
  order: Schema.optional(
@@ -11990,7 +11907,7 @@ export const ListObservabilityQueriesRequest =
11990
11907
  path: "/accounts/{account_id}/workers/observability/queries",
11991
11908
  }),
11992
11909
  ),
11993
- ) as unknown as Schema.Codec<ListObservabilityQueriesRequest>;
11910
+ ) as unknown as Schema.Codec<ListObservabilityQueriesRequest>;
11994
11911
 
11995
11912
  export interface ListObservabilityQueriesResponse {
11996
11913
  result: {
@@ -12133,12 +12050,12 @@ export interface ListObservabilityQueriesResponse {
12133
12050
  }[];
12134
12051
  }
12135
12052
 
12136
- export const ListObservabilityQueriesResponse =
12137
- /*@__PURE__*/ Schema.suspend(() =>
12053
+ export const ListObservabilityQueriesResponse = /*@__PURE__*/ Schema.suspend(
12054
+ () =>
12138
12055
  Schema.Struct({
12139
12056
  result: Schema.Array(ListObservabilityQueriesResponseResult),
12140
12057
  }),
12141
- ) as unknown as Schema.Codec<ListObservabilityQueriesResponse>;
12058
+ ) as unknown as Schema.Codec<ListObservabilityQueriesResponse>;
12142
12059
 
12143
12060
  export type ListObservabilityQueriesError = DefaultErrors;
12144
12061
 
@@ -12277,8 +12194,8 @@ export interface CreateObservabilityQueryRequest {
12277
12194
  };
12278
12195
  }
12279
12196
 
12280
- export const CreateObservabilityQueryRequest =
12281
- /*@__PURE__*/ Schema.suspend(() =>
12197
+ export const CreateObservabilityQueryRequest = /*@__PURE__*/ Schema.suspend(
12198
+ () =>
12282
12199
  Schema.Struct({
12283
12200
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
12284
12201
  description: Schema.Union([Schema.String, Schema.Null]),
@@ -12290,7 +12207,7 @@ export const CreateObservabilityQueryRequest =
12290
12207
  path: "/accounts/{account_id}/workers/observability/queries",
12291
12208
  }),
12292
12209
  ),
12293
- ) as unknown as Schema.Codec<CreateObservabilityQueryRequest>;
12210
+ ) as unknown as Schema.Codec<CreateObservabilityQueryRequest>;
12294
12211
 
12295
12212
  export interface CreateObservabilityQueryResponse {
12296
12213
  id: string;
@@ -12426,8 +12343,8 @@ export interface CreateObservabilityQueryResponse {
12426
12343
  updatedBy: string;
12427
12344
  }
12428
12345
 
12429
- export const CreateObservabilityQueryResponse =
12430
- /*@__PURE__*/ Schema.suspend(() =>
12346
+ export const CreateObservabilityQueryResponse = /*@__PURE__*/ Schema.suspend(
12347
+ () =>
12431
12348
  Schema.Struct({
12432
12349
  id: Schema.String,
12433
12350
  adhoc: Schema.Boolean,
@@ -12439,7 +12356,7 @@ export const CreateObservabilityQueryResponse =
12439
12356
  updated: Schema.String,
12440
12357
  updatedBy: Schema.String,
12441
12358
  }).pipe(T.ResponsePath("result")),
12442
- ) as unknown as Schema.Codec<CreateObservabilityQueryResponse>;
12359
+ ) as unknown as Schema.Codec<CreateObservabilityQueryResponse>;
12443
12360
 
12444
12361
  export type CreateObservabilityQueryError = DefaultErrors;
12445
12362
 
@@ -12466,8 +12383,8 @@ export interface GetObservabilitySharedQueryRequest {
12466
12383
  view?: "events" | "invocations" | "calculations" | (string & {});
12467
12384
  }
12468
12385
 
12469
- export const GetObservabilitySharedQueryRequest =
12470
- /*@__PURE__*/ Schema.suspend(() =>
12386
+ export const GetObservabilitySharedQueryRequest = /*@__PURE__*/ Schema.suspend(
12387
+ () =>
12471
12388
  Schema.Struct({
12472
12389
  id: Schema.String.pipe(T.HttpPath("id")),
12473
12390
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
@@ -12483,7 +12400,7 @@ export const GetObservabilitySharedQueryRequest =
12483
12400
  path: "/accounts/{account_id}/workers/observability/shared/query/{id}",
12484
12401
  }),
12485
12402
  ),
12486
- ) as unknown as Schema.Codec<GetObservabilitySharedQueryRequest>;
12403
+ ) as unknown as Schema.Codec<GetObservabilitySharedQueryRequest>;
12487
12404
 
12488
12405
  export interface GetObservabilitySharedQueryResponse {
12489
12406
  /** Represents a single execution of a query against Workers Observability data, including the query definition, execution status, and performance statistics. */
@@ -12888,8 +12805,8 @@ export interface GetObservabilitySharedQueryResponse {
12888
12805
  | null;
12889
12806
  }
12890
12807
 
12891
- export const GetObservabilitySharedQueryResponse =
12892
- /*@__PURE__*/ Schema.suspend(() =>
12808
+ export const GetObservabilitySharedQueryResponse = /*@__PURE__*/ Schema.suspend(
12809
+ () =>
12893
12810
  Schema.Struct({
12894
12811
  run: Run,
12895
12812
  statistics: Statistics,
@@ -12909,7 +12826,7 @@ export const GetObservabilitySharedQueryResponse =
12909
12826
  ),
12910
12827
  traces: Schema.optional(Schema.Union([Schema.Array(Trace), Schema.Null])),
12911
12828
  }).pipe(T.ResponsePath("result")),
12912
- ) as unknown as Schema.Codec<GetObservabilitySharedQueryResponse>;
12829
+ ) as unknown as Schema.Codec<GetObservabilitySharedQueryResponse>;
12913
12830
 
12914
12831
  export type GetObservabilitySharedQueryError = DefaultErrors;
12915
12832
 
@@ -13296,8 +13213,8 @@ export interface KeysObservabilityTelemetryRequest {
13296
13213
  to?: number;
13297
13214
  }
13298
13215
 
13299
- export const KeysObservabilityTelemetryRequest =
13300
- /*@__PURE__*/ Schema.suspend(() =>
13216
+ export const KeysObservabilityTelemetryRequest = /*@__PURE__*/ Schema.suspend(
13217
+ () =>
13301
13218
  Schema.Struct({
13302
13219
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
13303
13220
  datasets: Schema.optional(Schema.Array(Schema.String)),
@@ -13320,7 +13237,7 @@ export const KeysObservabilityTelemetryRequest =
13320
13237
  path: "/accounts/{account_id}/workers/observability/telemetry/keys",
13321
13238
  }),
13322
13239
  ),
13323
- ) as unknown as Schema.Codec<KeysObservabilityTelemetryRequest>;
13240
+ ) as unknown as Schema.Codec<KeysObservabilityTelemetryRequest>;
13324
13241
 
13325
13242
  export interface KeysObservabilityTelemetryResponse {
13326
13243
  result: {
@@ -13330,12 +13247,12 @@ export interface KeysObservabilityTelemetryResponse {
13330
13247
  }[];
13331
13248
  }
13332
13249
 
13333
- export const KeysObservabilityTelemetryResponse =
13334
- /*@__PURE__*/ Schema.suspend(() =>
13250
+ export const KeysObservabilityTelemetryResponse = /*@__PURE__*/ Schema.suspend(
13251
+ () =>
13335
13252
  Schema.Struct({
13336
13253
  result: Schema.Array(KeysObservabilityTelemetryResponseResult),
13337
13254
  }),
13338
- ) as unknown as Schema.Codec<KeysObservabilityTelemetryResponse>;
13255
+ ) as unknown as Schema.Codec<KeysObservabilityTelemetryResponse>;
13339
13256
 
13340
13257
  export type KeysObservabilityTelemetryError = DefaultErrors | InvalidRoute;
13341
13258
 
@@ -13545,8 +13462,8 @@ export interface QueryObservabilityTelemetryRequest {
13545
13462
  | (string & {});
13546
13463
  }
13547
13464
 
13548
- export const QueryObservabilityTelemetryRequest =
13549
- /*@__PURE__*/ Schema.suspend(() =>
13465
+ export const QueryObservabilityTelemetryRequest = /*@__PURE__*/ Schema.suspend(
13466
+ () =>
13550
13467
  Schema.Struct({
13551
13468
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
13552
13469
  queryId: Schema.String,
@@ -13580,7 +13497,7 @@ export const QueryObservabilityTelemetryRequest =
13580
13497
  path: "/accounts/{account_id}/workers/observability/telemetry/query",
13581
13498
  }),
13582
13499
  ),
13583
- ) as unknown as Schema.Codec<QueryObservabilityTelemetryRequest>;
13500
+ ) as unknown as Schema.Codec<QueryObservabilityTelemetryRequest>;
13584
13501
 
13585
13502
  export interface QueryObservabilityTelemetryResponse {
13586
13503
  /** Represents a single execution of a query against Workers Observability data, including the query definition, execution status, and performance statistics. */
@@ -13987,8 +13904,8 @@ export interface QueryObservabilityTelemetryResponse {
13987
13904
  | null;
13988
13905
  }
13989
13906
 
13990
- export const QueryObservabilityTelemetryResponse =
13991
- /*@__PURE__*/ Schema.suspend(() =>
13907
+ export const QueryObservabilityTelemetryResponse = /*@__PURE__*/ Schema.suspend(
13908
+ () =>
13992
13909
  Schema.Struct({
13993
13910
  run: Run2,
13994
13911
  statistics: Statistics,
@@ -14003,7 +13920,7 @@ export const QueryObservabilityTelemetryResponse =
14003
13920
  invocations: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
14004
13921
  traces: Schema.optional(Schema.Union([Schema.Array(Trace), Schema.Null])),
14005
13922
  }).pipe(T.ResponsePath("result")),
14006
- ) as unknown as Schema.Codec<QueryObservabilityTelemetryResponse>;
13923
+ ) as unknown as Schema.Codec<QueryObservabilityTelemetryResponse>;
14007
13924
 
14008
13925
  export type QueryObservabilityTelemetryError = DefaultErrors | InvalidRoute;
14009
13926
 
@@ -14129,8 +14046,8 @@ export interface ValuesObservabilityTelemetryRequest {
14129
14046
  };
14130
14047
  }
14131
14048
 
14132
- export const ValuesObservabilityTelemetryRequest =
14133
- /*@__PURE__*/ Schema.suspend(() =>
14049
+ export const ValuesObservabilityTelemetryRequest = /*@__PURE__*/ Schema.suspend(
14050
+ () =>
14134
14051
  Schema.Struct({
14135
14052
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
14136
14053
  datasets: Schema.Array(Schema.String),
@@ -14156,7 +14073,7 @@ export const ValuesObservabilityTelemetryRequest =
14156
14073
  path: "/accounts/{account_id}/workers/observability/telemetry/values",
14157
14074
  }),
14158
14075
  ),
14159
- ) as unknown as Schema.Codec<ValuesObservabilityTelemetryRequest>;
14076
+ ) as unknown as Schema.Codec<ValuesObservabilityTelemetryRequest>;
14160
14077
 
14161
14078
  export interface ValuesObservabilityTelemetryResponse {
14162
14079
  result: {
@@ -15060,6 +14977,7 @@ export interface PutScriptResponse {
15060
14977
  | (string & {})
15061
14978
  | null;
15062
14979
  }
14980
+ | { mode: "targeted" }
15063
14981
  | null;
15064
14982
  /** @deprecated */
15065
14983
  placementMode?: "smart" | "targeted" | (string & {}) | null;
@@ -15125,6 +15043,7 @@ export const PutScriptResponse = /*@__PURE__*/ Schema.suspend(() =>
15125
15043
  ListScriptsResponseResultPlacement1,
15126
15044
  ListScriptsResponseResultPlacement2,
15127
15045
  ListScriptsResponseResultPlacement3,
15046
+ PutScriptResponsePlacement8,
15128
15047
  ]),
15129
15048
  Schema.Null,
15130
15049
  ]),
@@ -15365,19 +15284,18 @@ export interface CreateScriptAssetUploadRequest {
15365
15284
  manifest: Record<string, unknown>;
15366
15285
  }
15367
15286
 
15368
- export const CreateScriptAssetUploadRequest =
15369
- /*@__PURE__*/ Schema.suspend(() =>
15370
- Schema.Struct({
15371
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15372
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15373
- manifest: Schema.Record(Schema.String, Schema.Unknown),
15374
- }).pipe(
15375
- T.Http({
15376
- method: "POST",
15377
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/assets-upload-session",
15378
- }),
15379
- ),
15380
- ) as unknown as Schema.Codec<CreateScriptAssetUploadRequest>;
15287
+ export const CreateScriptAssetUploadRequest = /*@__PURE__*/ Schema.suspend(() =>
15288
+ Schema.Struct({
15289
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15290
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15291
+ manifest: Schema.Record(Schema.String, Schema.Unknown),
15292
+ }).pipe(
15293
+ T.Http({
15294
+ method: "POST",
15295
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/assets-upload-session",
15296
+ }),
15297
+ ),
15298
+ ) as unknown as Schema.Codec<CreateScriptAssetUploadRequest>;
15381
15299
 
15382
15300
  export interface CreateScriptAssetUploadResponse {
15383
15301
  /** The requests to make to upload assets. */
@@ -15386,15 +15304,15 @@ export interface CreateScriptAssetUploadResponse {
15386
15304
  jwt?: string | null;
15387
15305
  }
15388
15306
 
15389
- export const CreateScriptAssetUploadResponse =
15390
- /*@__PURE__*/ Schema.suspend(() =>
15307
+ export const CreateScriptAssetUploadResponse = /*@__PURE__*/ Schema.suspend(
15308
+ () =>
15391
15309
  Schema.Struct({
15392
15310
  buckets: Schema.optional(
15393
15311
  Schema.Union([Schema.Array(Schema.Array(Schema.String)), Schema.Null]),
15394
15312
  ),
15395
15313
  jwt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15396
15314
  }).pipe(T.ResponsePath("result")),
15397
- ) as unknown as Schema.Codec<CreateScriptAssetUploadResponse>;
15315
+ ) as unknown as Schema.Codec<CreateScriptAssetUploadResponse>;
15398
15316
 
15399
15317
  export type CreateScriptAssetUploadError = DefaultErrors;
15400
15318
 
@@ -15419,25 +15337,23 @@ export interface GetScriptContentRequest {
15419
15337
  accountId: string;
15420
15338
  }
15421
15339
 
15422
- export const GetScriptContentRequest =
15423
- /*@__PURE__*/ Schema.suspend(() =>
15424
- Schema.Struct({
15425
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15426
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15427
- }).pipe(
15428
- T.Http({
15429
- method: "GET",
15430
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/content/v2",
15431
- }),
15432
- ),
15433
- ) as unknown as Schema.Codec<GetScriptContentRequest>;
15340
+ export const GetScriptContentRequest = /*@__PURE__*/ Schema.suspend(() =>
15341
+ Schema.Struct({
15342
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15343
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15344
+ }).pipe(
15345
+ T.Http({
15346
+ method: "GET",
15347
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/content/v2",
15348
+ }),
15349
+ ),
15350
+ ) as unknown as Schema.Codec<GetScriptContentRequest>;
15434
15351
 
15435
15352
  export type GetScriptContentResponse = unknown;
15436
15353
 
15437
- export const GetScriptContentResponse =
15438
- /*@__PURE__*/ Schema.suspend(
15439
- () => Schema.Unknown,
15440
- ) as unknown as Schema.Codec<GetScriptContentResponse>;
15354
+ export const GetScriptContentResponse = /*@__PURE__*/ Schema.suspend(
15355
+ () => Schema.Unknown,
15356
+ ) as unknown as Schema.Codec<GetScriptContentResponse>;
15441
15357
 
15442
15358
  export type GetScriptContentError = DefaultErrors | WorkerNotFound;
15443
15359
 
@@ -15466,29 +15382,28 @@ export interface PutScriptContentRequest {
15466
15382
  files?: (File | Blob)[];
15467
15383
  }
15468
15384
 
15469
- export const PutScriptContentRequest =
15470
- /*@__PURE__*/ Schema.suspend(() =>
15471
- Schema.Struct({
15472
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15473
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15474
- cfworkerbodypart: Schema.optional(Schema.String).pipe(
15475
- T.HttpHeader("CF-WORKER-BODY-PART"),
15476
- ),
15477
- cfworkermainmodulepart: Schema.optional(Schema.String).pipe(
15478
- T.HttpHeader("CF-WORKER-MAIN-MODULE-PART"),
15479
- ),
15480
- metadata: Metadata3,
15481
- files: Schema.optional(
15482
- Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
15483
- ),
15484
- }).pipe(
15485
- T.Http({
15486
- method: "PUT",
15487
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/content",
15488
- contentType: "multipart",
15489
- }),
15385
+ export const PutScriptContentRequest = /*@__PURE__*/ Schema.suspend(() =>
15386
+ Schema.Struct({
15387
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15388
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15389
+ cfworkerbodypart: Schema.optional(Schema.String).pipe(
15390
+ T.HttpHeader("CF-WORKER-BODY-PART"),
15391
+ ),
15392
+ cfworkermainmodulepart: Schema.optional(Schema.String).pipe(
15393
+ T.HttpHeader("CF-WORKER-MAIN-MODULE-PART"),
15394
+ ),
15395
+ metadata: Metadata3,
15396
+ files: Schema.optional(
15397
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
15490
15398
  ),
15491
- ) as unknown as Schema.Codec<PutScriptContentRequest>;
15399
+ }).pipe(
15400
+ T.Http({
15401
+ method: "PUT",
15402
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/content",
15403
+ contentType: "multipart",
15404
+ }),
15405
+ ),
15406
+ ) as unknown as Schema.Codec<PutScriptContentRequest>;
15492
15407
 
15493
15408
  export interface PutScriptContentResponse {
15494
15409
  /** The name used to identify the script. */
@@ -15652,113 +15567,110 @@ export interface PutScriptContentResponse {
15652
15567
  usageModel?: "standard" | "bundled" | "unbound" | (string & {}) | null;
15653
15568
  }
15654
15569
 
15655
- export const PutScriptContentResponse =
15656
- /*@__PURE__*/ Schema.suspend(() =>
15657
- Schema.Struct({
15658
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15659
- compatibilityDate: Schema.optional(
15660
- Schema.Union([Schema.String, Schema.Null]),
15661
- ),
15662
- compatibilityFlags: Schema.optional(
15663
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15664
- ),
15665
- createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15666
- etag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15667
- handlers: Schema.optional(
15668
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15669
- ),
15670
- hasAssets: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15671
- hasModules: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15672
- lastDeployedFrom: Schema.optional(
15673
- Schema.Union([Schema.String, Schema.Null]),
15674
- ),
15675
- logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15676
- migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15677
- modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15678
- namedHandlers: Schema.optional(
15679
- Schema.Union([Schema.Array(NamedHandler), Schema.Null]),
15680
- ),
15681
- observability: Schema.optional(
15682
- Schema.Union([Observability2, Schema.Null]),
15683
- ),
15684
- placement: Schema.optional(
15685
- Schema.Union([
15686
- Schema.Union([
15687
- ListScriptsResponseResultPlacement4,
15688
- ListScriptsResponseResultPlacement5,
15689
- ListScriptsResponseResultPlacement6,
15690
- ListScriptsResponseResultPlacement7,
15691
- ListScriptsResponseResultPlacement,
15692
- ListScriptsResponseResultPlacement1,
15693
- ListScriptsResponseResultPlacement2,
15694
- ListScriptsResponseResultPlacement3,
15695
- ]),
15696
- Schema.Null,
15697
- ]),
15698
- ),
15699
- placementMode: Schema.optional(
15700
- Schema.Union([
15701
- Schema.Union([Schema.Literals(["smart", "targeted"]), Schema.String]),
15702
- Schema.Null,
15703
- ]),
15704
- ),
15705
- placementStatus: Schema.optional(
15570
+ export const PutScriptContentResponse = /*@__PURE__*/ Schema.suspend(() =>
15571
+ Schema.Struct({
15572
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15573
+ compatibilityDate: Schema.optional(
15574
+ Schema.Union([Schema.String, Schema.Null]),
15575
+ ),
15576
+ compatibilityFlags: Schema.optional(
15577
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15578
+ ),
15579
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15580
+ etag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15581
+ handlers: Schema.optional(
15582
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15583
+ ),
15584
+ hasAssets: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15585
+ hasModules: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15586
+ lastDeployedFrom: Schema.optional(
15587
+ Schema.Union([Schema.String, Schema.Null]),
15588
+ ),
15589
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
15590
+ migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15591
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15592
+ namedHandlers: Schema.optional(
15593
+ Schema.Union([Schema.Array(NamedHandler), Schema.Null]),
15594
+ ),
15595
+ observability: Schema.optional(Schema.Union([Observability2, Schema.Null])),
15596
+ placement: Schema.optional(
15597
+ Schema.Union([
15706
15598
  Schema.Union([
15707
- Schema.Union([
15708
- Schema.Literals([
15709
- "SUCCESS",
15710
- "UNSUPPORTED_APPLICATION",
15711
- "INSUFFICIENT_INVOCATIONS",
15712
- ]),
15713
- Schema.String,
15714
- ]),
15715
- Schema.Null,
15599
+ ListScriptsResponseResultPlacement4,
15600
+ ListScriptsResponseResultPlacement5,
15601
+ ListScriptsResponseResultPlacement6,
15602
+ ListScriptsResponseResultPlacement7,
15603
+ ListScriptsResponseResultPlacement,
15604
+ ListScriptsResponseResultPlacement1,
15605
+ ListScriptsResponseResultPlacement2,
15606
+ ListScriptsResponseResultPlacement3,
15716
15607
  ]),
15717
- ),
15718
- tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15719
- tags: Schema.optional(
15720
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15721
- ),
15722
- tailConsumers: Schema.optional(
15723
- Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
15724
- ),
15725
- usageModel: Schema.optional(
15608
+ Schema.Null,
15609
+ ]),
15610
+ ),
15611
+ placementMode: Schema.optional(
15612
+ Schema.Union([
15613
+ Schema.Union([Schema.Literals(["smart", "targeted"]), Schema.String]),
15614
+ Schema.Null,
15615
+ ]),
15616
+ ),
15617
+ placementStatus: Schema.optional(
15618
+ Schema.Union([
15726
15619
  Schema.Union([
15727
- Schema.Union([
15728
- Schema.Literals(["standard", "bundled", "unbound"]),
15729
- Schema.String,
15620
+ Schema.Literals([
15621
+ "SUCCESS",
15622
+ "UNSUPPORTED_APPLICATION",
15623
+ "INSUFFICIENT_INVOCATIONS",
15730
15624
  ]),
15731
- Schema.Null,
15625
+ Schema.String,
15732
15626
  ]),
15733
- ),
15734
- })
15735
- .pipe(
15736
- Schema.encodeKeys({
15737
- id: "id",
15738
- compatibilityDate: "compatibility_date",
15739
- compatibilityFlags: "compatibility_flags",
15740
- createdOn: "created_on",
15741
- etag: "etag",
15742
- handlers: "handlers",
15743
- hasAssets: "has_assets",
15744
- hasModules: "has_modules",
15745
- lastDeployedFrom: "last_deployed_from",
15746
- logpush: "logpush",
15747
- migrationTag: "migration_tag",
15748
- modifiedOn: "modified_on",
15749
- namedHandlers: "named_handlers",
15750
- observability: "observability",
15751
- placement: "placement",
15752
- placementMode: "placement_mode",
15753
- placementStatus: "placement_status",
15754
- tag: "tag",
15755
- tags: "tags",
15756
- tailConsumers: "tail_consumers",
15757
- usageModel: "usage_model",
15758
- }),
15759
- )
15760
- .pipe(T.ResponsePath("result")),
15761
- ) as unknown as Schema.Codec<PutScriptContentResponse>;
15627
+ Schema.Null,
15628
+ ]),
15629
+ ),
15630
+ tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15631
+ tags: Schema.optional(
15632
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
15633
+ ),
15634
+ tailConsumers: Schema.optional(
15635
+ Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
15636
+ ),
15637
+ usageModel: Schema.optional(
15638
+ Schema.Union([
15639
+ Schema.Union([
15640
+ Schema.Literals(["standard", "bundled", "unbound"]),
15641
+ Schema.String,
15642
+ ]),
15643
+ Schema.Null,
15644
+ ]),
15645
+ ),
15646
+ })
15647
+ .pipe(
15648
+ Schema.encodeKeys({
15649
+ id: "id",
15650
+ compatibilityDate: "compatibility_date",
15651
+ compatibilityFlags: "compatibility_flags",
15652
+ createdOn: "created_on",
15653
+ etag: "etag",
15654
+ handlers: "handlers",
15655
+ hasAssets: "has_assets",
15656
+ hasModules: "has_modules",
15657
+ lastDeployedFrom: "last_deployed_from",
15658
+ logpush: "logpush",
15659
+ migrationTag: "migration_tag",
15660
+ modifiedOn: "modified_on",
15661
+ namedHandlers: "named_handlers",
15662
+ observability: "observability",
15663
+ placement: "placement",
15664
+ placementMode: "placement_mode",
15665
+ placementStatus: "placement_status",
15666
+ tag: "tag",
15667
+ tags: "tags",
15668
+ tailConsumers: "tail_consumers",
15669
+ usageModel: "usage_model",
15670
+ }),
15671
+ )
15672
+ .pipe(T.ResponsePath("result")),
15673
+ ) as unknown as Schema.Codec<PutScriptContentResponse>;
15762
15674
 
15763
15675
  export type PutScriptContentError =
15764
15676
  | DefaultErrors
@@ -15794,19 +15706,18 @@ export interface GetScriptDeploymentRequest {
15794
15706
  accountId: string;
15795
15707
  }
15796
15708
 
15797
- export const GetScriptDeploymentRequest =
15798
- /*@__PURE__*/ Schema.suspend(() =>
15799
- Schema.Struct({
15800
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15801
- deploymentId: Schema.String.pipe(T.HttpPath("deploymentId")),
15802
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15803
- }).pipe(
15804
- T.Http({
15805
- method: "GET",
15806
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments/{deploymentId}",
15807
- }),
15808
- ),
15809
- ) as unknown as Schema.Codec<GetScriptDeploymentRequest>;
15709
+ export const GetScriptDeploymentRequest = /*@__PURE__*/ Schema.suspend(() =>
15710
+ Schema.Struct({
15711
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15712
+ deploymentId: Schema.String.pipe(T.HttpPath("deploymentId")),
15713
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15714
+ }).pipe(
15715
+ T.Http({
15716
+ method: "GET",
15717
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments/{deploymentId}",
15718
+ }),
15719
+ ),
15720
+ ) as unknown as Schema.Codec<GetScriptDeploymentRequest>;
15810
15721
 
15811
15722
  export interface GetScriptDeploymentResponse {
15812
15723
  id: string;
@@ -15821,30 +15732,29 @@ export interface GetScriptDeploymentResponse {
15821
15732
  authorEmail?: string | null;
15822
15733
  }
15823
15734
 
15824
- export const GetScriptDeploymentResponse =
15825
- /*@__PURE__*/ Schema.suspend(() =>
15826
- Schema.Struct({
15827
- id: Schema.String,
15828
- createdOn: Schema.String,
15829
- source: Schema.String,
15830
- strategy: Schema.Literal("percentage"),
15831
- versions: Schema.Array(Version),
15832
- annotations: Schema.optional(Schema.Union([Annotations3, Schema.Null])),
15833
- authorEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15834
- })
15835
- .pipe(
15836
- Schema.encodeKeys({
15837
- id: "id",
15838
- createdOn: "created_on",
15839
- source: "source",
15840
- strategy: "strategy",
15841
- versions: "versions",
15842
- annotations: "annotations",
15843
- authorEmail: "author_email",
15844
- }),
15845
- )
15846
- .pipe(T.ResponsePath("result")),
15847
- ) as unknown as Schema.Codec<GetScriptDeploymentResponse>;
15735
+ export const GetScriptDeploymentResponse = /*@__PURE__*/ Schema.suspend(() =>
15736
+ Schema.Struct({
15737
+ id: Schema.String,
15738
+ createdOn: Schema.String,
15739
+ source: Schema.String,
15740
+ strategy: Schema.Literal("percentage"),
15741
+ versions: Schema.Array(Version),
15742
+ annotations: Schema.optional(Schema.Union([Annotations3, Schema.Null])),
15743
+ authorEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15744
+ })
15745
+ .pipe(
15746
+ Schema.encodeKeys({
15747
+ id: "id",
15748
+ createdOn: "created_on",
15749
+ source: "source",
15750
+ strategy: "strategy",
15751
+ versions: "versions",
15752
+ annotations: "annotations",
15753
+ authorEmail: "author_email",
15754
+ }),
15755
+ )
15756
+ .pipe(T.ResponsePath("result")),
15757
+ ) as unknown as Schema.Codec<GetScriptDeploymentResponse>;
15848
15758
 
15849
15759
  export type GetScriptDeploymentError =
15850
15760
  | DefaultErrors
@@ -15868,18 +15778,17 @@ export interface ListScriptDeploymentsRequest {
15868
15778
  accountId: string;
15869
15779
  }
15870
15780
 
15871
- export const ListScriptDeploymentsRequest =
15872
- /*@__PURE__*/ Schema.suspend(() =>
15873
- Schema.Struct({
15874
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15875
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15876
- }).pipe(
15877
- T.Http({
15878
- method: "GET",
15879
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments",
15880
- }),
15881
- ),
15882
- ) as unknown as Schema.Codec<ListScriptDeploymentsRequest>;
15781
+ export const ListScriptDeploymentsRequest = /*@__PURE__*/ Schema.suspend(() =>
15782
+ Schema.Struct({
15783
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15784
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15785
+ }).pipe(
15786
+ T.Http({
15787
+ method: "GET",
15788
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments",
15789
+ }),
15790
+ ),
15791
+ ) as unknown as Schema.Codec<ListScriptDeploymentsRequest>;
15883
15792
 
15884
15793
  export interface ListScriptDeploymentsResponse {
15885
15794
  deployments: {
@@ -15896,12 +15805,11 @@ export interface ListScriptDeploymentsResponse {
15896
15805
  }[];
15897
15806
  }
15898
15807
 
15899
- export const ListScriptDeploymentsResponse =
15900
- /*@__PURE__*/ Schema.suspend(() =>
15901
- Schema.Struct({
15902
- deployments: Schema.Array(Deployment),
15903
- }).pipe(T.ResponsePath("result")),
15904
- ) as unknown as Schema.Codec<ListScriptDeploymentsResponse>;
15808
+ export const ListScriptDeploymentsResponse = /*@__PURE__*/ Schema.suspend(() =>
15809
+ Schema.Struct({
15810
+ deployments: Schema.Array(Deployment),
15811
+ }).pipe(T.ResponsePath("result")),
15812
+ ) as unknown as Schema.Codec<ListScriptDeploymentsResponse>;
15905
15813
 
15906
15814
  export type ListScriptDeploymentsError = DefaultErrors | WorkerNotFound;
15907
15815
 
@@ -15930,22 +15838,21 @@ export interface CreateScriptDeploymentRequest {
15930
15838
  annotations?: { workersMessage?: string };
15931
15839
  }
15932
15840
 
15933
- export const CreateScriptDeploymentRequest =
15934
- /*@__PURE__*/ Schema.suspend(() =>
15935
- Schema.Struct({
15936
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15937
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
15938
- force: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("force")),
15939
- strategy: Schema.Literal("percentage"),
15940
- versions: Schema.Array(Version),
15941
- annotations: Schema.optional(Annotations4),
15942
- }).pipe(
15943
- T.Http({
15944
- method: "POST",
15945
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments",
15946
- }),
15947
- ),
15948
- ) as unknown as Schema.Codec<CreateScriptDeploymentRequest>;
15841
+ export const CreateScriptDeploymentRequest = /*@__PURE__*/ Schema.suspend(() =>
15842
+ Schema.Struct({
15843
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15844
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15845
+ force: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("force")),
15846
+ strategy: Schema.Literal("percentage"),
15847
+ versions: Schema.Array(Version),
15848
+ annotations: Schema.optional(Annotations4),
15849
+ }).pipe(
15850
+ T.Http({
15851
+ method: "POST",
15852
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments",
15853
+ }),
15854
+ ),
15855
+ ) as unknown as Schema.Codec<CreateScriptDeploymentRequest>;
15949
15856
 
15950
15857
  export interface CreateScriptDeploymentResponse {
15951
15858
  id: string;
@@ -15960,34 +15867,33 @@ export interface CreateScriptDeploymentResponse {
15960
15867
  authorEmail?: string | null;
15961
15868
  }
15962
15869
 
15963
- export const CreateScriptDeploymentResponse =
15964
- /*@__PURE__*/ Schema.suspend(() =>
15965
- Schema.Struct({
15966
- id: Schema.String,
15967
- createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15968
- source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15969
- strategy: Schema.optional(
15970
- Schema.Union([Schema.Literal("percentage"), Schema.Null]),
15971
- ),
15972
- versions: Schema.optional(
15973
- Schema.Union([Schema.Array(Version), Schema.Null]),
15974
- ),
15975
- annotations: Schema.optional(Schema.Union([Annotations3, Schema.Null])),
15976
- authorEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15977
- })
15978
- .pipe(
15979
- Schema.encodeKeys({
15980
- id: "id",
15981
- createdOn: "created_on",
15982
- source: "source",
15983
- strategy: "strategy",
15984
- versions: "versions",
15985
- annotations: "annotations",
15986
- authorEmail: "author_email",
15987
- }),
15988
- )
15989
- .pipe(T.ResponsePath("result")),
15990
- ) as unknown as Schema.Codec<CreateScriptDeploymentResponse>;
15870
+ export const CreateScriptDeploymentResponse = /*@__PURE__*/ Schema.suspend(() =>
15871
+ Schema.Struct({
15872
+ id: Schema.String,
15873
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15874
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15875
+ strategy: Schema.optional(
15876
+ Schema.Union([Schema.Literal("percentage"), Schema.Null]),
15877
+ ),
15878
+ versions: Schema.optional(
15879
+ Schema.Union([Schema.Array(Version), Schema.Null]),
15880
+ ),
15881
+ annotations: Schema.optional(Schema.Union([Annotations3, Schema.Null])),
15882
+ authorEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
15883
+ })
15884
+ .pipe(
15885
+ Schema.encodeKeys({
15886
+ id: "id",
15887
+ createdOn: "created_on",
15888
+ source: "source",
15889
+ strategy: "strategy",
15890
+ versions: "versions",
15891
+ annotations: "annotations",
15892
+ authorEmail: "author_email",
15893
+ }),
15894
+ )
15895
+ .pipe(T.ResponsePath("result")),
15896
+ ) as unknown as Schema.Codec<CreateScriptDeploymentResponse>;
15991
15897
 
15992
15898
  export type CreateScriptDeploymentError = DefaultErrors | WorkerNotFound;
15993
15899
 
@@ -16009,19 +15915,18 @@ export interface DeleteScriptDeploymentRequest {
16009
15915
  accountId: string;
16010
15916
  }
16011
15917
 
16012
- export const DeleteScriptDeploymentRequest =
16013
- /*@__PURE__*/ Schema.suspend(() =>
16014
- Schema.Struct({
16015
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
16016
- deploymentId: Schema.String.pipe(T.HttpPath("deploymentId")),
16017
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
16018
- }).pipe(
16019
- T.Http({
16020
- method: "DELETE",
16021
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments/{deploymentId}",
16022
- }),
16023
- ),
16024
- ) as unknown as Schema.Codec<DeleteScriptDeploymentRequest>;
15918
+ export const DeleteScriptDeploymentRequest = /*@__PURE__*/ Schema.suspend(() =>
15919
+ Schema.Struct({
15920
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
15921
+ deploymentId: Schema.String.pipe(T.HttpPath("deploymentId")),
15922
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
15923
+ }).pipe(
15924
+ T.Http({
15925
+ method: "DELETE",
15926
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/deployments/{deploymentId}",
15927
+ }),
15928
+ ),
15929
+ ) as unknown as Schema.Codec<DeleteScriptDeploymentRequest>;
16025
15930
 
16026
15931
  export interface DeleteScriptDeploymentResponse {
16027
15932
  errors: {
@@ -16040,14 +15945,13 @@ export interface DeleteScriptDeploymentResponse {
16040
15945
  success: true;
16041
15946
  }
16042
15947
 
16043
- export const DeleteScriptDeploymentResponse =
16044
- /*@__PURE__*/ Schema.suspend(() =>
16045
- Schema.Struct({
16046
- errors: Schema.Array(Error2),
16047
- messages: Schema.Array(Error2),
16048
- success: Schema.Literal(true),
16049
- }),
16050
- ) as unknown as Schema.Codec<DeleteScriptDeploymentResponse>;
15948
+ export const DeleteScriptDeploymentResponse = /*@__PURE__*/ Schema.suspend(() =>
15949
+ Schema.Struct({
15950
+ errors: Schema.Array(Error2),
15951
+ messages: Schema.Array(Error2),
15952
+ success: Schema.Literal(true),
15953
+ }),
15954
+ ) as unknown as Schema.Codec<DeleteScriptDeploymentResponse>;
16051
15955
 
16052
15956
  export type DeleteScriptDeploymentError =
16053
15957
  | DefaultErrors
@@ -16269,37 +16173,36 @@ export interface CreateScriptEdgePreviewRequest {
16269
16173
  | { routes: string[]; minimalMode?: boolean };
16270
16174
  }
16271
16175
 
16272
- export const CreateScriptEdgePreviewRequest =
16273
- /*@__PURE__*/ Schema.suspend(() =>
16274
- Schema.Struct({
16275
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
16276
- scriptName: Schema.String.pipe(T.HttpPath("script_name")),
16277
- cfPreviewUploadConfigToken: Schema.String.pipe(
16278
- T.HttpHeader("cf-preview-upload-config-token"),
16279
- ),
16280
- metadata: Schema.optional(CreateScriptEdgePreviewRequestMetadata),
16281
- files: Schema.optional(
16282
- Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
16283
- ),
16284
- wranglerSessionConfig: Schema.optional(
16285
- Schema.Union([
16286
- CreateScriptEdgePreviewRequestWranglerSessionConfig,
16287
- CreateScriptEdgePreviewRequestWranglerSessionConfig1,
16288
- ]),
16289
- ),
16290
- }).pipe(
16291
- Schema.encodeKeys({
16292
- metadata: "metadata",
16293
- files: "files",
16294
- wranglerSessionConfig: "wrangler-session-config",
16295
- }),
16296
- T.Http({
16297
- method: "POST",
16298
- path: "/accounts/{account_id}/workers/scripts/{script_name}/edge-preview",
16299
- contentType: "multipart",
16300
- }),
16176
+ export const CreateScriptEdgePreviewRequest = /*@__PURE__*/ Schema.suspend(() =>
16177
+ Schema.Struct({
16178
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
16179
+ scriptName: Schema.String.pipe(T.HttpPath("script_name")),
16180
+ cfPreviewUploadConfigToken: Schema.String.pipe(
16181
+ T.HttpHeader("cf-preview-upload-config-token"),
16182
+ ),
16183
+ metadata: Schema.optional(CreateScriptEdgePreviewRequestMetadata),
16184
+ files: Schema.optional(
16185
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
16301
16186
  ),
16302
- ) as unknown as Schema.Codec<CreateScriptEdgePreviewRequest>;
16187
+ wranglerSessionConfig: Schema.optional(
16188
+ Schema.Union([
16189
+ CreateScriptEdgePreviewRequestWranglerSessionConfig,
16190
+ CreateScriptEdgePreviewRequestWranglerSessionConfig1,
16191
+ ]),
16192
+ ),
16193
+ }).pipe(
16194
+ Schema.encodeKeys({
16195
+ metadata: "metadata",
16196
+ files: "files",
16197
+ wranglerSessionConfig: "wrangler-session-config",
16198
+ }),
16199
+ T.Http({
16200
+ method: "POST",
16201
+ path: "/accounts/{account_id}/workers/scripts/{script_name}/edge-preview",
16202
+ contentType: "multipart",
16203
+ }),
16204
+ ),
16205
+ ) as unknown as Schema.Codec<CreateScriptEdgePreviewRequest>;
16303
16206
 
16304
16207
  export interface CreateScriptEdgePreviewResponse {
16305
16208
  /** Token to send as cf-workers-preview-token header when making requests to the preview host. */
@@ -16308,8 +16211,8 @@ export interface CreateScriptEdgePreviewResponse {
16308
16211
  tailUrl?: string | null;
16309
16212
  }
16310
16213
 
16311
- export const CreateScriptEdgePreviewResponse =
16312
- /*@__PURE__*/ Schema.suspend(() =>
16214
+ export const CreateScriptEdgePreviewResponse = /*@__PURE__*/ Schema.suspend(
16215
+ () =>
16313
16216
  Schema.Struct({
16314
16217
  previewToken: Schema.String,
16315
16218
  tailUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -16321,7 +16224,7 @@ export const CreateScriptEdgePreviewResponse =
16321
16224
  }),
16322
16225
  )
16323
16226
  .pipe(T.ResponsePath("result")),
16324
- ) as unknown as Schema.Codec<CreateScriptEdgePreviewResponse>;
16227
+ ) as unknown as Schema.Codec<CreateScriptEdgePreviewResponse>;
16325
16228
 
16326
16229
  export type CreateScriptEdgePreviewError = DefaultErrors | InvalidRoute;
16327
16230
 
@@ -16346,18 +16249,17 @@ export interface GetScriptScheduleRequest {
16346
16249
  accountId: string;
16347
16250
  }
16348
16251
 
16349
- export const GetScriptScheduleRequest =
16350
- /*@__PURE__*/ Schema.suspend(() =>
16351
- Schema.Struct({
16352
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
16353
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
16354
- }).pipe(
16355
- T.Http({
16356
- method: "GET",
16357
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/schedules",
16358
- }),
16359
- ),
16360
- ) as unknown as Schema.Codec<GetScriptScheduleRequest>;
16252
+ export const GetScriptScheduleRequest = /*@__PURE__*/ Schema.suspend(() =>
16253
+ Schema.Struct({
16254
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
16255
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
16256
+ }).pipe(
16257
+ T.Http({
16258
+ method: "GET",
16259
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/schedules",
16260
+ }),
16261
+ ),
16262
+ ) as unknown as Schema.Codec<GetScriptScheduleRequest>;
16361
16263
 
16362
16264
  export interface GetScriptScheduleResponse {
16363
16265
  schedules: {
@@ -16367,12 +16269,11 @@ export interface GetScriptScheduleResponse {
16367
16269
  }[];
16368
16270
  }
16369
16271
 
16370
- export const GetScriptScheduleResponse =
16371
- /*@__PURE__*/ Schema.suspend(() =>
16372
- Schema.Struct({
16373
- schedules: Schema.Array(Schedule),
16374
- }).pipe(T.ResponsePath("result")),
16375
- ) as unknown as Schema.Codec<GetScriptScheduleResponse>;
16272
+ export const GetScriptScheduleResponse = /*@__PURE__*/ Schema.suspend(() =>
16273
+ Schema.Struct({
16274
+ schedules: Schema.Array(Schedule),
16275
+ }).pipe(T.ResponsePath("result")),
16276
+ ) as unknown as Schema.Codec<GetScriptScheduleResponse>;
16376
16277
 
16377
16278
  export type GetScriptScheduleError = DefaultErrors | WorkerNotFound;
16378
16279
 
@@ -16395,19 +16296,18 @@ export interface PutScriptScheduleRequest {
16395
16296
  body: { cron: string }[];
16396
16297
  }
16397
16298
 
16398
- export const PutScriptScheduleRequest =
16399
- /*@__PURE__*/ Schema.suspend(() =>
16400
- Schema.Struct({
16401
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
16402
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
16403
- body: Schema.Array(Body).pipe(T.HttpBody()),
16404
- }).pipe(
16405
- T.Http({
16406
- method: "PUT",
16407
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/schedules",
16408
- }),
16409
- ),
16410
- ) as unknown as Schema.Codec<PutScriptScheduleRequest>;
16299
+ export const PutScriptScheduleRequest = /*@__PURE__*/ Schema.suspend(() =>
16300
+ Schema.Struct({
16301
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
16302
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
16303
+ body: Schema.Array(Body).pipe(T.HttpBody()),
16304
+ }).pipe(
16305
+ T.Http({
16306
+ method: "PUT",
16307
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/schedules",
16308
+ }),
16309
+ ),
16310
+ ) as unknown as Schema.Codec<PutScriptScheduleRequest>;
16411
16311
 
16412
16312
  export interface PutScriptScheduleResponse {
16413
16313
  schedules: {
@@ -16417,12 +16317,11 @@ export interface PutScriptScheduleResponse {
16417
16317
  }[];
16418
16318
  }
16419
16319
 
16420
- export const PutScriptScheduleResponse =
16421
- /*@__PURE__*/ Schema.suspend(() =>
16422
- Schema.Struct({
16423
- schedules: Schema.Array(Schedule),
16424
- }).pipe(T.ResponsePath("result")),
16425
- ) as unknown as Schema.Codec<PutScriptScheduleResponse>;
16320
+ export const PutScriptScheduleResponse = /*@__PURE__*/ Schema.suspend(() =>
16321
+ Schema.Struct({
16322
+ schedules: Schema.Array(Schedule),
16323
+ }).pipe(T.ResponsePath("result")),
16324
+ ) as unknown as Schema.Codec<PutScriptScheduleResponse>;
16426
16325
 
16427
16326
  export type PutScriptScheduleError = DefaultErrors | WorkerNotFound;
16428
16327
 
@@ -17284,22 +17183,21 @@ export interface GetScriptSecretRequest {
17284
17183
  urlEncoded?: boolean;
17285
17184
  }
17286
17185
 
17287
- export const GetScriptSecretRequest =
17288
- /*@__PURE__*/ Schema.suspend(() =>
17289
- Schema.Struct({
17290
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17291
- secretName: Schema.String.pipe(T.HttpPath("secretName")),
17292
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17293
- urlEncoded: Schema.optional(Schema.Boolean).pipe(
17294
- T.HttpQuery("url_encoded"),
17295
- ),
17296
- }).pipe(
17297
- T.Http({
17298
- method: "GET",
17299
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets/{secretName}",
17300
- }),
17186
+ export const GetScriptSecretRequest = /*@__PURE__*/ Schema.suspend(() =>
17187
+ Schema.Struct({
17188
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17189
+ secretName: Schema.String.pipe(T.HttpPath("secretName")),
17190
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17191
+ urlEncoded: Schema.optional(Schema.Boolean).pipe(
17192
+ T.HttpQuery("url_encoded"),
17301
17193
  ),
17302
- ) as unknown as Schema.Codec<GetScriptSecretRequest>;
17194
+ }).pipe(
17195
+ T.Http({
17196
+ method: "GET",
17197
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets/{secretName}",
17198
+ }),
17199
+ ),
17200
+ ) as unknown as Schema.Codec<GetScriptSecretRequest>;
17303
17201
 
17304
17202
  export type GetScriptSecretResponse =
17305
17203
  | { name: string; type: "secret_text" }
@@ -17321,13 +17219,12 @@ export type GetScriptSecretResponse =
17321
17219
  )[];
17322
17220
  };
17323
17221
 
17324
- export const GetScriptSecretResponse =
17325
- /*@__PURE__*/ Schema.suspend(() =>
17326
- Schema.Union([
17327
- WorkersBindingKindSecretKey,
17328
- WorkersBindingKindSecretText,
17329
- ]).pipe(T.ResponsePath("result")),
17330
- ) as unknown as Schema.Codec<GetScriptSecretResponse>;
17222
+ export const GetScriptSecretResponse = /*@__PURE__*/ Schema.suspend(() =>
17223
+ Schema.Union([
17224
+ WorkersBindingKindSecretKey,
17225
+ WorkersBindingKindSecretText,
17226
+ ]).pipe(T.ResponsePath("result")),
17227
+ ) as unknown as Schema.Codec<GetScriptSecretResponse>;
17331
17228
 
17332
17229
  export type GetScriptSecretError =
17333
17230
  | DefaultErrors
@@ -17351,18 +17248,17 @@ export interface ListScriptSecretsRequest {
17351
17248
  accountId: string;
17352
17249
  }
17353
17250
 
17354
- export const ListScriptSecretsRequest =
17355
- /*@__PURE__*/ Schema.suspend(() =>
17356
- Schema.Struct({
17357
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17358
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17359
- }).pipe(
17360
- T.Http({
17361
- method: "GET",
17362
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets",
17363
- }),
17364
- ),
17365
- ) as unknown as Schema.Codec<ListScriptSecretsRequest>;
17251
+ export const ListScriptSecretsRequest = /*@__PURE__*/ Schema.suspend(() =>
17252
+ Schema.Struct({
17253
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17254
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17255
+ }).pipe(
17256
+ T.Http({
17257
+ method: "GET",
17258
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets",
17259
+ }),
17260
+ ),
17261
+ ) as unknown as Schema.Codec<ListScriptSecretsRequest>;
17366
17262
 
17367
17263
  export interface ListScriptSecretsResponse {
17368
17264
  result: (
@@ -17387,17 +17283,13 @@ export interface ListScriptSecretsResponse {
17387
17283
  )[];
17388
17284
  }
17389
17285
 
17390
- export const ListScriptSecretsResponse =
17391
- /*@__PURE__*/ Schema.suspend(() =>
17392
- Schema.Struct({
17393
- result: Schema.Array(
17394
- Schema.Union([
17395
- WorkersBindingKindSecretKey,
17396
- WorkersBindingKindSecretText,
17397
- ]),
17398
- ),
17399
- }),
17400
- ) as unknown as Schema.Codec<ListScriptSecretsResponse>;
17286
+ export const ListScriptSecretsResponse = /*@__PURE__*/ Schema.suspend(() =>
17287
+ Schema.Struct({
17288
+ result: Schema.Array(
17289
+ Schema.Union([WorkersBindingKindSecretKey, WorkersBindingKindSecretText]),
17290
+ ),
17291
+ }),
17292
+ ) as unknown as Schema.Codec<ListScriptSecretsResponse>;
17401
17293
 
17402
17294
  export type ListScriptSecretsError = DefaultErrors | WorkerNotFound;
17403
17295
 
@@ -17448,60 +17340,59 @@ export interface PutScriptSecretRequest {
17448
17340
  keyJwk?: unknown;
17449
17341
  }
17450
17342
 
17451
- export const PutScriptSecretRequest =
17452
- /*@__PURE__*/ Schema.suspend(() =>
17453
- Schema.Struct({
17454
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17455
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17456
- name: Schema.String,
17457
- text: Schema.optional(Schema.String),
17458
- type: Schema.Union([
17459
- Schema.Literals(["secret_text", "secret_key"]),
17343
+ export const PutScriptSecretRequest = /*@__PURE__*/ Schema.suspend(() =>
17344
+ Schema.Struct({
17345
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17346
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17347
+ name: Schema.String,
17348
+ text: Schema.optional(Schema.String),
17349
+ type: Schema.Union([
17350
+ Schema.Literals(["secret_text", "secret_key"]),
17351
+ Schema.String,
17352
+ ]),
17353
+ algorithm: Schema.optional(Schema.Unknown),
17354
+ format: Schema.optional(
17355
+ Schema.Union([
17356
+ Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
17460
17357
  Schema.String,
17461
17358
  ]),
17462
- algorithm: Schema.optional(Schema.Unknown),
17463
- format: Schema.optional(
17359
+ ),
17360
+ usages: Schema.optional(
17361
+ Schema.Array(
17464
17362
  Schema.Union([
17465
- Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
17363
+ Schema.Literals([
17364
+ "encrypt",
17365
+ "decrypt",
17366
+ "sign",
17367
+ "verify",
17368
+ "deriveKey",
17369
+ "deriveBits",
17370
+ "wrapKey",
17371
+ "unwrapKey",
17372
+ ]),
17466
17373
  Schema.String,
17467
17374
  ]),
17468
17375
  ),
17469
- usages: Schema.optional(
17470
- Schema.Array(
17471
- Schema.Union([
17472
- Schema.Literals([
17473
- "encrypt",
17474
- "decrypt",
17475
- "sign",
17476
- "verify",
17477
- "deriveKey",
17478
- "deriveBits",
17479
- "wrapKey",
17480
- "unwrapKey",
17481
- ]),
17482
- Schema.String,
17483
- ]),
17484
- ),
17485
- ),
17486
- keyBase64: Schema.optional(Schema.String),
17487
- keyJwk: Schema.optional(Schema.Unknown),
17488
- }).pipe(
17489
- Schema.encodeKeys({
17490
- name: "name",
17491
- text: "text",
17492
- type: "type",
17493
- algorithm: "algorithm",
17494
- format: "format",
17495
- usages: "usages",
17496
- keyBase64: "key_base64",
17497
- keyJwk: "key_jwk",
17498
- }),
17499
- T.Http({
17500
- method: "PUT",
17501
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets",
17502
- }),
17503
17376
  ),
17504
- ) as unknown as Schema.Codec<PutScriptSecretRequest>;
17377
+ keyBase64: Schema.optional(Schema.String),
17378
+ keyJwk: Schema.optional(Schema.Unknown),
17379
+ }).pipe(
17380
+ Schema.encodeKeys({
17381
+ name: "name",
17382
+ text: "text",
17383
+ type: "type",
17384
+ algorithm: "algorithm",
17385
+ format: "format",
17386
+ usages: "usages",
17387
+ keyBase64: "key_base64",
17388
+ keyJwk: "key_jwk",
17389
+ }),
17390
+ T.Http({
17391
+ method: "PUT",
17392
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets",
17393
+ }),
17394
+ ),
17395
+ ) as unknown as Schema.Codec<PutScriptSecretRequest>;
17505
17396
 
17506
17397
  export type PutScriptSecretResponse =
17507
17398
  | { name: string; type: "secret_text" }
@@ -17523,13 +17414,12 @@ export type PutScriptSecretResponse =
17523
17414
  )[];
17524
17415
  };
17525
17416
 
17526
- export const PutScriptSecretResponse =
17527
- /*@__PURE__*/ Schema.suspend(() =>
17528
- Schema.Union([
17529
- WorkersBindingKindSecretKey,
17530
- WorkersBindingKindSecretText,
17531
- ]).pipe(T.ResponsePath("result")),
17532
- ) as unknown as Schema.Codec<PutScriptSecretResponse>;
17417
+ export const PutScriptSecretResponse = /*@__PURE__*/ Schema.suspend(() =>
17418
+ Schema.Union([
17419
+ WorkersBindingKindSecretKey,
17420
+ WorkersBindingKindSecretText,
17421
+ ]).pipe(T.ResponsePath("result")),
17422
+ ) as unknown as Schema.Codec<PutScriptSecretResponse>;
17533
17423
 
17534
17424
  export type PutScriptSecretError = DefaultErrors | WorkerNotFound;
17535
17425
 
@@ -17553,30 +17443,28 @@ export interface DeleteScriptSecretRequest {
17553
17443
  urlEncoded?: boolean;
17554
17444
  }
17555
17445
 
17556
- export const DeleteScriptSecretRequest =
17557
- /*@__PURE__*/ Schema.suspend(() =>
17558
- Schema.Struct({
17559
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17560
- secretName: Schema.String.pipe(T.HttpPath("secretName")),
17561
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17562
- urlEncoded: Schema.optional(Schema.Boolean).pipe(
17563
- T.HttpQuery("url_encoded"),
17564
- ),
17565
- }).pipe(
17566
- T.Http({
17567
- method: "DELETE",
17568
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets/{secretName}",
17569
- }),
17446
+ export const DeleteScriptSecretRequest = /*@__PURE__*/ Schema.suspend(() =>
17447
+ Schema.Struct({
17448
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17449
+ secretName: Schema.String.pipe(T.HttpPath("secretName")),
17450
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17451
+ urlEncoded: Schema.optional(Schema.Boolean).pipe(
17452
+ T.HttpQuery("url_encoded"),
17570
17453
  ),
17571
- ) as unknown as Schema.Codec<DeleteScriptSecretRequest>;
17454
+ }).pipe(
17455
+ T.Http({
17456
+ method: "DELETE",
17457
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets/{secretName}",
17458
+ }),
17459
+ ),
17460
+ ) as unknown as Schema.Codec<DeleteScriptSecretRequest>;
17572
17461
 
17573
17462
  export type DeleteScriptSecretResponse = unknown;
17574
17463
 
17575
- export const DeleteScriptSecretResponse =
17576
- /*@__PURE__*/ Schema.suspend(() =>
17577
- Schema.Unknown.pipe(T.ResponsePath("result")),
17578
- ) as unknown as Schema.Codec<DeleteScriptSecretResponse>;
17579
-
17464
+ export const DeleteScriptSecretResponse = /*@__PURE__*/ Schema.suspend(() =>
17465
+ Schema.Unknown.pipe(T.ResponsePath("result")),
17466
+ ) as unknown as Schema.Codec<DeleteScriptSecretResponse>;
17467
+
17580
17468
  export type DeleteScriptSecretError =
17581
17469
  | DefaultErrors
17582
17470
  | WorkerNotFound
@@ -17603,30 +17491,27 @@ export interface BulkUpdateScriptSecretsRequest {
17603
17491
  versionTags?: Record<string, unknown>;
17604
17492
  }
17605
17493
 
17606
- export const BulkUpdateScriptSecretsRequest =
17607
- /*@__PURE__*/ Schema.suspend(() =>
17608
- Schema.Struct({
17609
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17610
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17611
- secrets: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
17612
- versionTags: Schema.optional(
17613
- Schema.Record(Schema.String, Schema.Unknown),
17614
- ),
17615
- }).pipe(
17616
- Schema.encodeKeys({ secrets: "secrets", versionTags: "version_tags" }),
17617
- T.Http({
17618
- method: "PATCH",
17619
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets-bulk",
17620
- }),
17621
- ),
17622
- ) as unknown as Schema.Codec<BulkUpdateScriptSecretsRequest>;
17494
+ export const BulkUpdateScriptSecretsRequest = /*@__PURE__*/ Schema.suspend(() =>
17495
+ Schema.Struct({
17496
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17497
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17498
+ secrets: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
17499
+ versionTags: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
17500
+ }).pipe(
17501
+ Schema.encodeKeys({ secrets: "secrets", versionTags: "version_tags" }),
17502
+ T.Http({
17503
+ method: "PATCH",
17504
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/secrets-bulk",
17505
+ }),
17506
+ ),
17507
+ ) as unknown as Schema.Codec<BulkUpdateScriptSecretsRequest>;
17623
17508
 
17624
17509
  export type BulkUpdateScriptSecretsResponse = Record<string, unknown>;
17625
17510
 
17626
- export const BulkUpdateScriptSecretsResponse =
17627
- /*@__PURE__*/ Schema.suspend(() =>
17511
+ export const BulkUpdateScriptSecretsResponse = /*@__PURE__*/ Schema.suspend(
17512
+ () =>
17628
17513
  Schema.Record(Schema.String, Schema.Unknown).pipe(T.ResponsePath("result")),
17629
- ) as unknown as Schema.Codec<BulkUpdateScriptSecretsResponse>;
17514
+ ) as unknown as Schema.Codec<BulkUpdateScriptSecretsResponse>;
17630
17515
 
17631
17516
  export type BulkUpdateScriptSecretsError = DefaultErrors;
17632
17517
 
@@ -17651,18 +17536,17 @@ export interface GetScriptSettingRequest {
17651
17536
  accountId: string;
17652
17537
  }
17653
17538
 
17654
- export const GetScriptSettingRequest =
17655
- /*@__PURE__*/ Schema.suspend(() =>
17656
- Schema.Struct({
17657
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17658
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17659
- }).pipe(
17660
- T.Http({
17661
- method: "GET",
17662
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/script-settings",
17663
- }),
17664
- ),
17665
- ) as unknown as Schema.Codec<GetScriptSettingRequest>;
17539
+ export const GetScriptSettingRequest = /*@__PURE__*/ Schema.suspend(() =>
17540
+ Schema.Struct({
17541
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17542
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17543
+ }).pipe(
17544
+ T.Http({
17545
+ method: "GET",
17546
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/script-settings",
17547
+ }),
17548
+ ),
17549
+ ) as unknown as Schema.Codec<GetScriptSettingRequest>;
17666
17550
 
17667
17551
  export interface GetScriptSettingResponse {
17668
17552
  /** Whether Logpush is turned on for the Worker. */
@@ -17698,30 +17582,27 @@ export interface GetScriptSettingResponse {
17698
17582
  | null;
17699
17583
  }
17700
17584
 
17701
- export const GetScriptSettingResponse =
17702
- /*@__PURE__*/ Schema.suspend(() =>
17703
- Schema.Struct({
17704
- logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
17705
- observability: Schema.optional(
17706
- Schema.Union([Observability2, Schema.Null]),
17707
- ),
17708
- tags: Schema.optional(
17709
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17710
- ),
17711
- tailConsumers: Schema.optional(
17712
- Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17713
- ),
17714
- })
17715
- .pipe(
17716
- Schema.encodeKeys({
17717
- logpush: "logpush",
17718
- observability: "observability",
17719
- tags: "tags",
17720
- tailConsumers: "tail_consumers",
17721
- }),
17722
- )
17723
- .pipe(T.ResponsePath("result")),
17724
- ) as unknown as Schema.Codec<GetScriptSettingResponse>;
17585
+ export const GetScriptSettingResponse = /*@__PURE__*/ Schema.suspend(() =>
17586
+ Schema.Struct({
17587
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
17588
+ observability: Schema.optional(Schema.Union([Observability2, Schema.Null])),
17589
+ tags: Schema.optional(
17590
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17591
+ ),
17592
+ tailConsumers: Schema.optional(
17593
+ Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17594
+ ),
17595
+ })
17596
+ .pipe(
17597
+ Schema.encodeKeys({
17598
+ logpush: "logpush",
17599
+ observability: "observability",
17600
+ tags: "tags",
17601
+ tailConsumers: "tail_consumers",
17602
+ }),
17603
+ )
17604
+ .pipe(T.ResponsePath("result")),
17605
+ ) as unknown as Schema.Codec<GetScriptSettingResponse>;
17725
17606
 
17726
17607
  export type GetScriptSettingError =
17727
17608
  | DefaultErrors
@@ -17772,34 +17653,31 @@ export interface PatchScriptSettingRequest {
17772
17653
  | null;
17773
17654
  }
17774
17655
 
17775
- export const PatchScriptSettingRequest =
17776
- /*@__PURE__*/ Schema.suspend(() =>
17777
- Schema.Struct({
17778
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17779
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17780
- logpush: Schema.optional(Schema.Boolean),
17781
- observability: Schema.optional(
17782
- Schema.Union([Observability2, Schema.Null]),
17783
- ),
17784
- tags: Schema.optional(
17785
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17786
- ),
17787
- tailConsumers: Schema.optional(
17788
- Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17789
- ),
17790
- }).pipe(
17791
- Schema.encodeKeys({
17792
- logpush: "logpush",
17793
- observability: "observability",
17794
- tags: "tags",
17795
- tailConsumers: "tail_consumers",
17796
- }),
17797
- T.Http({
17798
- method: "PATCH",
17799
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/script-settings",
17800
- }),
17656
+ export const PatchScriptSettingRequest = /*@__PURE__*/ Schema.suspend(() =>
17657
+ Schema.Struct({
17658
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17659
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17660
+ logpush: Schema.optional(Schema.Boolean),
17661
+ observability: Schema.optional(Schema.Union([Observability2, Schema.Null])),
17662
+ tags: Schema.optional(
17663
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17664
+ ),
17665
+ tailConsumers: Schema.optional(
17666
+ Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17801
17667
  ),
17802
- ) as unknown as Schema.Codec<PatchScriptSettingRequest>;
17668
+ }).pipe(
17669
+ Schema.encodeKeys({
17670
+ logpush: "logpush",
17671
+ observability: "observability",
17672
+ tags: "tags",
17673
+ tailConsumers: "tail_consumers",
17674
+ }),
17675
+ T.Http({
17676
+ method: "PATCH",
17677
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/script-settings",
17678
+ }),
17679
+ ),
17680
+ ) as unknown as Schema.Codec<PatchScriptSettingRequest>;
17803
17681
 
17804
17682
  export interface PatchScriptSettingResponse {
17805
17683
  /** Whether Logpush is turned on for the Worker. */
@@ -17835,30 +17713,27 @@ export interface PatchScriptSettingResponse {
17835
17713
  | null;
17836
17714
  }
17837
17715
 
17838
- export const PatchScriptSettingResponse =
17839
- /*@__PURE__*/ Schema.suspend(() =>
17840
- Schema.Struct({
17841
- logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
17842
- observability: Schema.optional(
17843
- Schema.Union([Observability2, Schema.Null]),
17844
- ),
17845
- tags: Schema.optional(
17846
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17847
- ),
17848
- tailConsumers: Schema.optional(
17849
- Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17850
- ),
17851
- })
17852
- .pipe(
17853
- Schema.encodeKeys({
17854
- logpush: "logpush",
17855
- observability: "observability",
17856
- tags: "tags",
17857
- tailConsumers: "tail_consumers",
17858
- }),
17859
- )
17860
- .pipe(T.ResponsePath("result")),
17861
- ) as unknown as Schema.Codec<PatchScriptSettingResponse>;
17716
+ export const PatchScriptSettingResponse = /*@__PURE__*/ Schema.suspend(() =>
17717
+ Schema.Struct({
17718
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
17719
+ observability: Schema.optional(Schema.Union([Observability2, Schema.Null])),
17720
+ tags: Schema.optional(
17721
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
17722
+ ),
17723
+ tailConsumers: Schema.optional(
17724
+ Schema.Union([Schema.Array(ConsumerScript), Schema.Null]),
17725
+ ),
17726
+ })
17727
+ .pipe(
17728
+ Schema.encodeKeys({
17729
+ logpush: "logpush",
17730
+ observability: "observability",
17731
+ tags: "tags",
17732
+ tailConsumers: "tail_consumers",
17733
+ }),
17734
+ )
17735
+ .pipe(T.ResponsePath("result")),
17736
+ ) as unknown as Schema.Codec<PatchScriptSettingResponse>;
17862
17737
 
17863
17738
  export type PatchScriptSettingError = DefaultErrors | WorkerNotFound;
17864
17739
 
@@ -17883,18 +17758,17 @@ export interface GetScriptSubdomainRequest {
17883
17758
  accountId: string;
17884
17759
  }
17885
17760
 
17886
- export const GetScriptSubdomainRequest =
17887
- /*@__PURE__*/ Schema.suspend(() =>
17888
- Schema.Struct({
17889
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17890
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17891
- }).pipe(
17892
- T.Http({
17893
- method: "GET",
17894
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
17895
- }),
17896
- ),
17897
- ) as unknown as Schema.Codec<GetScriptSubdomainRequest>;
17761
+ export const GetScriptSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
17762
+ Schema.Struct({
17763
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17764
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17765
+ }).pipe(
17766
+ T.Http({
17767
+ method: "GET",
17768
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
17769
+ }),
17770
+ ),
17771
+ ) as unknown as Schema.Codec<GetScriptSubdomainRequest>;
17898
17772
 
17899
17773
  export interface GetScriptSubdomainResponse {
17900
17774
  /** Whether the Worker is available on the workers.dev subdomain. */
@@ -17903,20 +17777,19 @@ export interface GetScriptSubdomainResponse {
17903
17777
  previewsEnabled: boolean;
17904
17778
  }
17905
17779
 
17906
- export const GetScriptSubdomainResponse =
17907
- /*@__PURE__*/ Schema.suspend(() =>
17908
- Schema.Struct({
17909
- enabled: Schema.Boolean,
17910
- previewsEnabled: Schema.Boolean,
17911
- })
17912
- .pipe(
17913
- Schema.encodeKeys({
17914
- enabled: "enabled",
17915
- previewsEnabled: "previews_enabled",
17916
- }),
17917
- )
17918
- .pipe(T.ResponsePath("result")),
17919
- ) as unknown as Schema.Codec<GetScriptSubdomainResponse>;
17780
+ export const GetScriptSubdomainResponse = /*@__PURE__*/ Schema.suspend(() =>
17781
+ Schema.Struct({
17782
+ enabled: Schema.Boolean,
17783
+ previewsEnabled: Schema.Boolean,
17784
+ })
17785
+ .pipe(
17786
+ Schema.encodeKeys({
17787
+ enabled: "enabled",
17788
+ previewsEnabled: "previews_enabled",
17789
+ }),
17790
+ )
17791
+ .pipe(T.ResponsePath("result")),
17792
+ ) as unknown as Schema.Codec<GetScriptSubdomainResponse>;
17920
17793
 
17921
17794
  export type GetScriptSubdomainError = DefaultErrors | WorkerNotFound;
17922
17795
 
@@ -17941,24 +17814,23 @@ export interface CreateScriptSubdomainRequest {
17941
17814
  previewsEnabled?: boolean;
17942
17815
  }
17943
17816
 
17944
- export const CreateScriptSubdomainRequest =
17945
- /*@__PURE__*/ Schema.suspend(() =>
17946
- Schema.Struct({
17947
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17948
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
17949
- enabled: Schema.Boolean,
17950
- previewsEnabled: Schema.optional(Schema.Boolean),
17951
- }).pipe(
17952
- Schema.encodeKeys({
17953
- enabled: "enabled",
17954
- previewsEnabled: "previews_enabled",
17955
- }),
17956
- T.Http({
17957
- method: "POST",
17958
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
17959
- }),
17960
- ),
17961
- ) as unknown as Schema.Codec<CreateScriptSubdomainRequest>;
17817
+ export const CreateScriptSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
17818
+ Schema.Struct({
17819
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17820
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17821
+ enabled: Schema.Boolean,
17822
+ previewsEnabled: Schema.optional(Schema.Boolean),
17823
+ }).pipe(
17824
+ Schema.encodeKeys({
17825
+ enabled: "enabled",
17826
+ previewsEnabled: "previews_enabled",
17827
+ }),
17828
+ T.Http({
17829
+ method: "POST",
17830
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
17831
+ }),
17832
+ ),
17833
+ ) as unknown as Schema.Codec<CreateScriptSubdomainRequest>;
17962
17834
 
17963
17835
  export interface CreateScriptSubdomainResponse {
17964
17836
  /** Whether the Worker is available on the workers.dev subdomain. */
@@ -17967,20 +17839,19 @@ export interface CreateScriptSubdomainResponse {
17967
17839
  previewsEnabled: boolean;
17968
17840
  }
17969
17841
 
17970
- export const CreateScriptSubdomainResponse =
17971
- /*@__PURE__*/ Schema.suspend(() =>
17972
- Schema.Struct({
17973
- enabled: Schema.Boolean,
17974
- previewsEnabled: Schema.Boolean,
17975
- })
17976
- .pipe(
17977
- Schema.encodeKeys({
17978
- enabled: "enabled",
17979
- previewsEnabled: "previews_enabled",
17980
- }),
17981
- )
17982
- .pipe(T.ResponsePath("result")),
17983
- ) as unknown as Schema.Codec<CreateScriptSubdomainResponse>;
17842
+ export const CreateScriptSubdomainResponse = /*@__PURE__*/ Schema.suspend(() =>
17843
+ Schema.Struct({
17844
+ enabled: Schema.Boolean,
17845
+ previewsEnabled: Schema.Boolean,
17846
+ })
17847
+ .pipe(
17848
+ Schema.encodeKeys({
17849
+ enabled: "enabled",
17850
+ previewsEnabled: "previews_enabled",
17851
+ }),
17852
+ )
17853
+ .pipe(T.ResponsePath("result")),
17854
+ ) as unknown as Schema.Codec<CreateScriptSubdomainResponse>;
17984
17855
 
17985
17856
  export type CreateScriptSubdomainError = DefaultErrors | WorkerNotFound;
17986
17857
 
@@ -17996,23 +17867,22 @@ export const createScriptSubdomain: API.OperationMethod<
17996
17867
  }));
17997
17868
 
17998
17869
  export interface DeleteScriptSubdomainRequest {
17999
- scriptName: string;
18000
- /** Identifier. */
18001
- accountId: string;
18002
- }
18003
-
18004
- export const DeleteScriptSubdomainRequest =
18005
- /*@__PURE__*/ Schema.suspend(() =>
18006
- Schema.Struct({
18007
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18008
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18009
- }).pipe(
18010
- T.Http({
18011
- method: "DELETE",
18012
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
18013
- }),
18014
- ),
18015
- ) as unknown as Schema.Codec<DeleteScriptSubdomainRequest>;
17870
+ scriptName: string;
17871
+ /** Identifier. */
17872
+ accountId: string;
17873
+ }
17874
+
17875
+ export const DeleteScriptSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
17876
+ Schema.Struct({
17877
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17878
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17879
+ }).pipe(
17880
+ T.Http({
17881
+ method: "DELETE",
17882
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/subdomain",
17883
+ }),
17884
+ ),
17885
+ ) as unknown as Schema.Codec<DeleteScriptSubdomainRequest>;
18016
17886
 
18017
17887
  export interface DeleteScriptSubdomainResponse {
18018
17888
  /** Whether the Worker is available on the workers.dev subdomain. */
@@ -18021,20 +17891,19 @@ export interface DeleteScriptSubdomainResponse {
18021
17891
  previewsEnabled: boolean;
18022
17892
  }
18023
17893
 
18024
- export const DeleteScriptSubdomainResponse =
18025
- /*@__PURE__*/ Schema.suspend(() =>
18026
- Schema.Struct({
18027
- enabled: Schema.Boolean,
18028
- previewsEnabled: Schema.Boolean,
18029
- })
18030
- .pipe(
18031
- Schema.encodeKeys({
18032
- enabled: "enabled",
18033
- previewsEnabled: "previews_enabled",
18034
- }),
18035
- )
18036
- .pipe(T.ResponsePath("result")),
18037
- ) as unknown as Schema.Codec<DeleteScriptSubdomainResponse>;
17894
+ export const DeleteScriptSubdomainResponse = /*@__PURE__*/ Schema.suspend(() =>
17895
+ Schema.Struct({
17896
+ enabled: Schema.Boolean,
17897
+ previewsEnabled: Schema.Boolean,
17898
+ })
17899
+ .pipe(
17900
+ Schema.encodeKeys({
17901
+ enabled: "enabled",
17902
+ previewsEnabled: "previews_enabled",
17903
+ }),
17904
+ )
17905
+ .pipe(T.ResponsePath("result")),
17906
+ ) as unknown as Schema.Codec<DeleteScriptSubdomainResponse>;
18038
17907
 
18039
17908
  export type DeleteScriptSubdomainError = DefaultErrors | WorkerNotFound;
18040
17909
 
@@ -18109,19 +17978,18 @@ export interface CreateScriptTailRequest {
18109
17978
  body: unknown;
18110
17979
  }
18111
17980
 
18112
- export const CreateScriptTailRequest =
18113
- /*@__PURE__*/ Schema.suspend(() =>
18114
- Schema.Struct({
18115
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18116
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18117
- body: Schema.Unknown.pipe(T.HttpBody()),
18118
- }).pipe(
18119
- T.Http({
18120
- method: "POST",
18121
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/tails",
18122
- }),
18123
- ),
18124
- ) as unknown as Schema.Codec<CreateScriptTailRequest>;
17981
+ export const CreateScriptTailRequest = /*@__PURE__*/ Schema.suspend(() =>
17982
+ Schema.Struct({
17983
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
17984
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
17985
+ body: Schema.Unknown.pipe(T.HttpBody()),
17986
+ }).pipe(
17987
+ T.Http({
17988
+ method: "POST",
17989
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/tails",
17990
+ }),
17991
+ ),
17992
+ ) as unknown as Schema.Codec<CreateScriptTailRequest>;
18125
17993
 
18126
17994
  export interface CreateScriptTailResponse {
18127
17995
  /** Identifier. */
@@ -18130,18 +17998,15 @@ export interface CreateScriptTailResponse {
18130
17998
  url: string;
18131
17999
  }
18132
18000
 
18133
- export const CreateScriptTailResponse =
18134
- /*@__PURE__*/ Schema.suspend(() =>
18135
- Schema.Struct({
18136
- id: Schema.String,
18137
- expiresAt: Schema.String,
18138
- url: Schema.String,
18139
- })
18140
- .pipe(
18141
- Schema.encodeKeys({ id: "id", expiresAt: "expires_at", url: "url" }),
18142
- )
18143
- .pipe(T.ResponsePath("result")),
18144
- ) as unknown as Schema.Codec<CreateScriptTailResponse>;
18001
+ export const CreateScriptTailResponse = /*@__PURE__*/ Schema.suspend(() =>
18002
+ Schema.Struct({
18003
+ id: Schema.String,
18004
+ expiresAt: Schema.String,
18005
+ url: Schema.String,
18006
+ })
18007
+ .pipe(Schema.encodeKeys({ id: "id", expiresAt: "expires_at", url: "url" }))
18008
+ .pipe(T.ResponsePath("result")),
18009
+ ) as unknown as Schema.Codec<CreateScriptTailResponse>;
18145
18010
 
18146
18011
  export type CreateScriptTailError = DefaultErrors | WorkerNotFound;
18147
18012
 
@@ -18163,19 +18028,18 @@ export interface DeleteScriptTailRequest {
18163
18028
  accountId: string;
18164
18029
  }
18165
18030
 
18166
- export const DeleteScriptTailRequest =
18167
- /*@__PURE__*/ Schema.suspend(() =>
18168
- Schema.Struct({
18169
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18170
- id: Schema.String.pipe(T.HttpPath("id")),
18171
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18172
- }).pipe(
18173
- T.Http({
18174
- method: "DELETE",
18175
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/tails/{id}",
18176
- }),
18177
- ),
18178
- ) as unknown as Schema.Codec<DeleteScriptTailRequest>;
18031
+ export const DeleteScriptTailRequest = /*@__PURE__*/ Schema.suspend(() =>
18032
+ Schema.Struct({
18033
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18034
+ id: Schema.String.pipe(T.HttpPath("id")),
18035
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
18036
+ }).pipe(
18037
+ T.Http({
18038
+ method: "DELETE",
18039
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/tails/{id}",
18040
+ }),
18041
+ ),
18042
+ ) as unknown as Schema.Codec<DeleteScriptTailRequest>;
18179
18043
 
18180
18044
  export interface DeleteScriptTailResponse {
18181
18045
  errors: {
@@ -18194,14 +18058,13 @@ export interface DeleteScriptTailResponse {
18194
18058
  success: true;
18195
18059
  }
18196
18060
 
18197
- export const DeleteScriptTailResponse =
18198
- /*@__PURE__*/ Schema.suspend(() =>
18199
- Schema.Struct({
18200
- errors: Schema.Array(Error2),
18201
- messages: Schema.Array(Error2),
18202
- success: Schema.Literal(true),
18203
- }),
18204
- ) as unknown as Schema.Codec<DeleteScriptTailResponse>;
18061
+ export const DeleteScriptTailResponse = /*@__PURE__*/ Schema.suspend(() =>
18062
+ Schema.Struct({
18063
+ errors: Schema.Array(Error2),
18064
+ messages: Schema.Array(Error2),
18065
+ success: Schema.Literal(true),
18066
+ }),
18067
+ ) as unknown as Schema.Codec<DeleteScriptTailResponse>;
18205
18068
 
18206
18069
  export type DeleteScriptTailError = DefaultErrors | WorkerNotFound;
18207
18070
 
@@ -18227,19 +18090,18 @@ export interface GetScriptVersionRequest {
18227
18090
  accountId: string;
18228
18091
  }
18229
18092
 
18230
- export const GetScriptVersionRequest =
18231
- /*@__PURE__*/ Schema.suspend(() =>
18232
- Schema.Struct({
18233
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18234
- versionId: Schema.String.pipe(T.HttpPath("versionId")),
18235
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18236
- }).pipe(
18237
- T.Http({
18238
- method: "GET",
18239
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions/{versionId}",
18240
- }),
18241
- ),
18242
- ) as unknown as Schema.Codec<GetScriptVersionRequest>;
18093
+ export const GetScriptVersionRequest = /*@__PURE__*/ Schema.suspend(() =>
18094
+ Schema.Struct({
18095
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18096
+ versionId: Schema.String.pipe(T.HttpPath("versionId")),
18097
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
18098
+ }).pipe(
18099
+ T.Http({
18100
+ method: "GET",
18101
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions/{versionId}",
18102
+ }),
18103
+ ),
18104
+ ) as unknown as Schema.Codec<GetScriptVersionRequest>;
18243
18105
 
18244
18106
  export interface GetScriptVersionResponse {
18245
18107
  resources: {
@@ -18419,15 +18281,14 @@ export interface GetScriptVersionResponse {
18419
18281
  number?: number | null;
18420
18282
  }
18421
18283
 
18422
- export const GetScriptVersionResponse =
18423
- /*@__PURE__*/ Schema.suspend(() =>
18424
- Schema.Struct({
18425
- resources: Resources,
18426
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
18427
- metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
18428
- number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
18429
- }).pipe(T.ResponsePath("result")),
18430
- ) as unknown as Schema.Codec<GetScriptVersionResponse>;
18284
+ export const GetScriptVersionResponse = /*@__PURE__*/ Schema.suspend(() =>
18285
+ Schema.Struct({
18286
+ resources: Resources,
18287
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
18288
+ metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
18289
+ number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
18290
+ }).pipe(T.ResponsePath("result")),
18291
+ ) as unknown as Schema.Codec<GetScriptVersionResponse>;
18431
18292
 
18432
18293
  export type GetScriptVersionError =
18433
18294
  | DefaultErrors
@@ -18455,23 +18316,20 @@ export interface ListScriptVersionsRequest {
18455
18316
  deployable?: boolean;
18456
18317
  }
18457
18318
 
18458
- export const ListScriptVersionsRequest =
18459
- /*@__PURE__*/ Schema.suspend(() =>
18460
- Schema.Struct({
18461
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18462
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18463
- page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
18464
- perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
18465
- deployable: Schema.optional(Schema.Boolean).pipe(
18466
- T.HttpQuery("deployable"),
18467
- ),
18468
- }).pipe(
18469
- T.Http({
18470
- method: "GET",
18471
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions",
18472
- }),
18473
- ),
18474
- ) as unknown as Schema.Codec<ListScriptVersionsRequest>;
18319
+ export const ListScriptVersionsRequest = /*@__PURE__*/ Schema.suspend(() =>
18320
+ Schema.Struct({
18321
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18322
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
18323
+ page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
18324
+ perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
18325
+ deployable: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("deployable")),
18326
+ }).pipe(
18327
+ T.Http({
18328
+ method: "GET",
18329
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions",
18330
+ }),
18331
+ ),
18332
+ ) as unknown as Schema.Codec<ListScriptVersionsRequest>;
18475
18333
 
18476
18334
  export interface ListScriptVersionsResponse {
18477
18335
  result: {
@@ -18510,15 +18368,14 @@ export interface ListScriptVersionsResponse {
18510
18368
  } | null;
18511
18369
  }
18512
18370
 
18513
- export const ListScriptVersionsResponse =
18514
- /*@__PURE__*/ Schema.suspend(() =>
18515
- Schema.Struct({
18516
- result: ListScriptVersionsResponseResult,
18517
- resultInfo: Schema.optional(
18518
- Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
18519
- ),
18520
- }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
18521
- ) as unknown as Schema.Codec<ListScriptVersionsResponse>;
18371
+ export const ListScriptVersionsResponse = /*@__PURE__*/ Schema.suspend(() =>
18372
+ Schema.Struct({
18373
+ result: ListScriptVersionsResponseResult,
18374
+ resultInfo: Schema.optional(
18375
+ Schema.Union([ListBetaWorkersResponseResultInfo, Schema.Null]),
18376
+ ),
18377
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
18378
+ ) as unknown as Schema.Codec<ListScriptVersionsResponse>;
18522
18379
 
18523
18380
  export type ListScriptVersionsError = DefaultErrors | WorkerNotFound;
18524
18381
 
@@ -18684,26 +18541,25 @@ export interface CreateScriptVersionRequest {
18684
18541
  files?: (File | Blob)[];
18685
18542
  }
18686
18543
 
18687
- export const CreateScriptVersionRequest =
18688
- /*@__PURE__*/ Schema.suspend(() =>
18689
- Schema.Struct({
18690
- scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18691
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
18692
- bindingsInherit: Schema.optional(Schema.Literal("strict")).pipe(
18693
- T.HttpQuery("bindings_inherit"),
18694
- ),
18695
- metadata: Metadata5,
18696
- files: Schema.optional(
18697
- Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
18698
- ),
18699
- }).pipe(
18700
- T.Http({
18701
- method: "POST",
18702
- path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions",
18703
- contentType: "multipart",
18704
- }),
18544
+ export const CreateScriptVersionRequest = /*@__PURE__*/ Schema.suspend(() =>
18545
+ Schema.Struct({
18546
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
18547
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
18548
+ bindingsInherit: Schema.optional(Schema.Literal("strict")).pipe(
18549
+ T.HttpQuery("bindings_inherit"),
18550
+ ),
18551
+ metadata: Metadata5,
18552
+ files: Schema.optional(
18553
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
18705
18554
  ),
18706
- ) as unknown as Schema.Codec<CreateScriptVersionRequest>;
18555
+ }).pipe(
18556
+ T.Http({
18557
+ method: "POST",
18558
+ path: "/accounts/{account_id}/workers/scripts/{scriptName}/versions",
18559
+ contentType: "multipart",
18560
+ }),
18561
+ ),
18562
+ ) as unknown as Schema.Codec<CreateScriptVersionRequest>;
18707
18563
 
18708
18564
  export interface CreateScriptVersionResponse {
18709
18565
  resources: {
@@ -18885,30 +18741,44 @@ export interface CreateScriptVersionResponse {
18885
18741
  startupTimeMs?: number | null;
18886
18742
  }
18887
18743
 
18888
- export const CreateScriptVersionResponse =
18889
- /*@__PURE__*/ Schema.suspend(() =>
18890
- Schema.Struct({
18891
- resources: Resources,
18892
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
18893
- metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
18894
- number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
18895
- startupTimeMs: Schema.optional(
18896
- Schema.Union([Schema.Number, Schema.Null]),
18897
- ),
18898
- })
18899
- .pipe(
18900
- Schema.encodeKeys({
18901
- resources: "resources",
18902
- id: "id",
18903
- metadata: "metadata",
18904
- number: "number",
18905
- startupTimeMs: "startup_time_ms",
18906
- }),
18907
- )
18908
- .pipe(T.ResponsePath("result")),
18909
- ) as unknown as Schema.Codec<CreateScriptVersionResponse>;
18744
+ export const CreateScriptVersionResponse = /*@__PURE__*/ Schema.suspend(() =>
18745
+ Schema.Struct({
18746
+ resources: Resources,
18747
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
18748
+ metadata: Schema.optional(Schema.Union([Metadata4, Schema.Null])),
18749
+ number: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
18750
+ startupTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
18751
+ })
18752
+ .pipe(
18753
+ Schema.encodeKeys({
18754
+ resources: "resources",
18755
+ id: "id",
18756
+ metadata: "metadata",
18757
+ number: "number",
18758
+ startupTimeMs: "startup_time_ms",
18759
+ }),
18760
+ )
18761
+ .pipe(T.ResponsePath("result")),
18762
+ ) as unknown as Schema.Codec<CreateScriptVersionResponse>;
18910
18763
 
18911
- export type CreateScriptVersionError = DefaultErrors | WorkerNotFound;
18764
+ export type CreateScriptVersionError =
18765
+ | DefaultErrors
18766
+ | WorkerNotFound
18767
+ | InvalidWorkerScript
18768
+ | InternalServerError
18769
+ | ScriptStartupError
18770
+ | ScriptModuleNotFound
18771
+ | SecretsStoreBindingNotFound
18772
+ | KVNamespaceNotFound
18773
+ | R2BucketNotFound
18774
+ | D1DatabaseNotFound
18775
+ | QueueNotFound
18776
+ | ServiceBindingNotFound
18777
+ | DurableObjectClassNotFound
18778
+ | HyperdriveConfigNotFound
18779
+ | VectorizeIndexNotFound
18780
+ | DispatchNamespaceNotFound
18781
+ | MtlsCertificateNotFound;
18912
18782
 
18913
18783
  export const createScriptVersion: API.OperationMethod<
18914
18784
  CreateScriptVersionRequest,
@@ -18918,7 +18788,24 @@ export const createScriptVersion: API.OperationMethod<
18918
18788
  > = /*@__PURE__*/ API.make(() => ({
18919
18789
  input: CreateScriptVersionRequest,
18920
18790
  output: CreateScriptVersionResponse,
18921
- errors: [WorkerNotFound],
18791
+ errors: [
18792
+ WorkerNotFound,
18793
+ InvalidWorkerScript,
18794
+ InternalServerError,
18795
+ ScriptStartupError,
18796
+ ScriptModuleNotFound,
18797
+ SecretsStoreBindingNotFound,
18798
+ KVNamespaceNotFound,
18799
+ R2BucketNotFound,
18800
+ D1DatabaseNotFound,
18801
+ QueueNotFound,
18802
+ ServiceBindingNotFound,
18803
+ DurableObjectClassNotFound,
18804
+ HyperdriveConfigNotFound,
18805
+ VectorizeIndexNotFound,
18806
+ DispatchNamespaceNotFound,
18807
+ MtlsCertificateNotFound,
18808
+ ],
18922
18809
  }));
18923
18810
 
18924
18811
  // =============================================================================
@@ -19126,8 +19013,8 @@ export interface CreateServiceEdgePreviewRequest {
19126
19013
  | { routes: string[]; minimalMode?: boolean };
19127
19014
  }
19128
19015
 
19129
- export const CreateServiceEdgePreviewRequest =
19130
- /*@__PURE__*/ Schema.suspend(() =>
19016
+ export const CreateServiceEdgePreviewRequest = /*@__PURE__*/ Schema.suspend(
19017
+ () =>
19131
19018
  Schema.Struct({
19132
19019
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
19133
19020
  serviceName: Schema.String.pipe(T.HttpPath("service_name")),
@@ -19157,7 +19044,7 @@ export const CreateServiceEdgePreviewRequest =
19157
19044
  contentType: "multipart",
19158
19045
  }),
19159
19046
  ),
19160
- ) as unknown as Schema.Codec<CreateServiceEdgePreviewRequest>;
19047
+ ) as unknown as Schema.Codec<CreateServiceEdgePreviewRequest>;
19161
19048
 
19162
19049
  export interface CreateServiceEdgePreviewResponse {
19163
19050
  /** Token to send as cf-workers-preview-token header when making requests to the preview host. */
@@ -19166,8 +19053,8 @@ export interface CreateServiceEdgePreviewResponse {
19166
19053
  tailUrl?: string | null;
19167
19054
  }
19168
19055
 
19169
- export const CreateServiceEdgePreviewResponse =
19170
- /*@__PURE__*/ Schema.suspend(() =>
19056
+ export const CreateServiceEdgePreviewResponse = /*@__PURE__*/ Schema.suspend(
19057
+ () =>
19171
19058
  Schema.Struct({
19172
19059
  previewToken: Schema.String,
19173
19060
  tailUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -19179,7 +19066,7 @@ export const CreateServiceEdgePreviewResponse =
19179
19066
  }),
19180
19067
  )
19181
19068
  .pipe(T.ResponsePath("result")),
19182
- ) as unknown as Schema.Codec<CreateServiceEdgePreviewResponse>;
19069
+ ) as unknown as Schema.Codec<CreateServiceEdgePreviewResponse>;
19183
19070
 
19184
19071
  export type CreateServiceEdgePreviewError = DefaultErrors | InvalidRoute;
19185
19072
 
@@ -19207,10 +19094,7 @@ export const GetSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
19207
19094
  Schema.Struct({
19208
19095
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
19209
19096
  }).pipe(
19210
- T.Http({
19211
- method: "GET",
19212
- path: "/accounts/{account_id}/workers/subdomain",
19213
- }),
19097
+ T.Http({ method: "GET", path: "/accounts/{account_id}/workers/subdomain" }),
19214
19098
  ),
19215
19099
  ) as unknown as Schema.Codec<GetSubdomainRequest>;
19216
19100
 
@@ -19253,10 +19137,7 @@ export const PutSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
19253
19137
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
19254
19138
  subdomain: Schema.String,
19255
19139
  }).pipe(
19256
- T.Http({
19257
- method: "PUT",
19258
- path: "/accounts/{account_id}/workers/subdomain",
19259
- }),
19140
+ T.Http({ method: "PUT", path: "/accounts/{account_id}/workers/subdomain" }),
19260
19141
  ),
19261
19142
  ) as unknown as Schema.Codec<PutSubdomainRequest>;
19262
19143
 
@@ -19292,24 +19173,22 @@ export interface DeleteSubdomainRequest {
19292
19173
  accountId: string;
19293
19174
  }
19294
19175
 
19295
- export const DeleteSubdomainRequest =
19296
- /*@__PURE__*/ Schema.suspend(() =>
19297
- Schema.Struct({
19298
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
19299
- }).pipe(
19300
- T.Http({
19301
- method: "DELETE",
19302
- path: "/accounts/{account_id}/workers/subdomain",
19303
- }),
19304
- ),
19305
- ) as unknown as Schema.Codec<DeleteSubdomainRequest>;
19176
+ export const DeleteSubdomainRequest = /*@__PURE__*/ Schema.suspend(() =>
19177
+ Schema.Struct({
19178
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
19179
+ }).pipe(
19180
+ T.Http({
19181
+ method: "DELETE",
19182
+ path: "/accounts/{account_id}/workers/subdomain",
19183
+ }),
19184
+ ),
19185
+ ) as unknown as Schema.Codec<DeleteSubdomainRequest>;
19306
19186
 
19307
19187
  export type DeleteSubdomainResponse = unknown;
19308
19188
 
19309
- export const DeleteSubdomainResponse =
19310
- /*@__PURE__*/ Schema.suspend(
19311
- () => Schema.Unknown,
19312
- ) as unknown as Schema.Codec<DeleteSubdomainResponse>;
19189
+ export const DeleteSubdomainResponse = /*@__PURE__*/ Schema.suspend(
19190
+ () => Schema.Unknown,
19191
+ ) as unknown as Schema.Codec<DeleteSubdomainResponse>;
19313
19192
 
19314
19193
  export type DeleteSubdomainError =
19315
19194
  | DefaultErrors
@@ -19587,14 +19466,14 @@ export interface CreateZoneEdgePreviewSessionRequest {
19587
19466
  zoneId: string;
19588
19467
  }
19589
19468
 
19590
- export const CreateZoneEdgePreviewSessionRequest =
19591
- /*@__PURE__*/ Schema.suspend(() =>
19469
+ export const CreateZoneEdgePreviewSessionRequest = /*@__PURE__*/ Schema.suspend(
19470
+ () =>
19592
19471
  Schema.Struct({
19593
19472
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
19594
19473
  }).pipe(
19595
19474
  T.Http({ method: "GET", path: "/zones/{zone_id}/workers/edge-preview" }),
19596
19475
  ),
19597
- ) as unknown as Schema.Codec<CreateZoneEdgePreviewSessionRequest>;
19476
+ ) as unknown as Schema.Codec<CreateZoneEdgePreviewSessionRequest>;
19598
19477
 
19599
19478
  export interface CreateZoneEdgePreviewSessionResponse {
19600
19479
  /** Session token used as cf-preview-upload-config-token when uploading a preview worker. */