@distilled.cloud/cloudflare 0.6.0 → 0.7.0

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.
Files changed (261) hide show
  1. package/lib/services/accounts.d.ts +901 -36
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1386 -32
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/addressing.d.ts +8 -2
  6. package/lib/services/addressing.d.ts.map +1 -1
  7. package/lib/services/addressing.js +14 -2
  8. package/lib/services/addressing.js.map +1 -1
  9. package/lib/services/ai-gateway.d.ts.map +1 -1
  10. package/lib/services/ai-gateway.js +7 -7
  11. package/lib/services/ai-gateway.js.map +1 -1
  12. package/lib/services/aisearch.d.ts.map +1 -1
  13. package/lib/services/aisearch.js +24 -9
  14. package/lib/services/aisearch.js.map +1 -1
  15. package/lib/services/alerting.js +2 -2
  16. package/lib/services/alerting.js.map +1 -1
  17. package/lib/services/api-gateway.d.ts +114 -16
  18. package/lib/services/api-gateway.d.ts.map +1 -1
  19. package/lib/services/api-gateway.js +187 -15
  20. package/lib/services/api-gateway.js.map +1 -1
  21. package/lib/services/audit-logs.d.ts +63 -3
  22. package/lib/services/audit-logs.d.ts.map +1 -1
  23. package/lib/services/audit-logs.js +62 -3
  24. package/lib/services/audit-logs.js.map +1 -1
  25. package/lib/services/bot-management.d.ts +54 -8
  26. package/lib/services/bot-management.d.ts.map +1 -1
  27. package/lib/services/bot-management.js +128 -16
  28. package/lib/services/bot-management.js.map +1 -1
  29. package/lib/services/brand-protection.d.ts.map +1 -1
  30. package/lib/services/brand-protection.js +26 -8
  31. package/lib/services/brand-protection.js.map +1 -1
  32. package/lib/services/browser-rendering.d.ts.map +1 -1
  33. package/lib/services/browser-rendering.js +13 -10
  34. package/lib/services/browser-rendering.js.map +1 -1
  35. package/lib/services/cloudforce-one.d.ts +61 -6
  36. package/lib/services/cloudforce-one.d.ts.map +1 -1
  37. package/lib/services/cloudforce-one.js +107 -6
  38. package/lib/services/cloudforce-one.js.map +1 -1
  39. package/lib/services/custom-certificates.d.ts +145 -8
  40. package/lib/services/custom-certificates.d.ts.map +1 -1
  41. package/lib/services/custom-certificates.js +226 -7
  42. package/lib/services/custom-certificates.js.map +1 -1
  43. package/lib/services/custom-hostnames.d.ts +8 -8
  44. package/lib/services/custom-hostnames.d.ts.map +1 -1
  45. package/lib/services/custom-hostnames.js +17 -14
  46. package/lib/services/custom-hostnames.js.map +1 -1
  47. package/lib/services/d1.d.ts +68 -8
  48. package/lib/services/d1.d.ts.map +1 -1
  49. package/lib/services/d1.js +96 -8
  50. package/lib/services/d1.js.map +1 -1
  51. package/lib/services/dns-firewall.d.ts +57 -4
  52. package/lib/services/dns-firewall.d.ts.map +1 -1
  53. package/lib/services/dns-firewall.js +86 -5
  54. package/lib/services/dns-firewall.js.map +1 -1
  55. package/lib/services/dns.d.ts +85 -745
  56. package/lib/services/dns.d.ts.map +1 -1
  57. package/lib/services/dns.js +118 -1424
  58. package/lib/services/dns.js.map +1 -1
  59. package/lib/services/email-routing.d.ts +59 -7
  60. package/lib/services/email-routing.d.ts.map +1 -1
  61. package/lib/services/email-routing.js +165 -7
  62. package/lib/services/email-routing.js.map +1 -1
  63. package/lib/services/firewall.d.ts +228 -39
  64. package/lib/services/firewall.d.ts.map +1 -1
  65. package/lib/services/firewall.js +220 -33
  66. package/lib/services/firewall.js.map +1 -1
  67. package/lib/services/healthchecks.d.ts +112 -6
  68. package/lib/services/healthchecks.d.ts.map +1 -1
  69. package/lib/services/healthchecks.js +248 -14
  70. package/lib/services/healthchecks.js.map +1 -1
  71. package/lib/services/hostnames.d.ts +5 -5
  72. package/lib/services/hostnames.d.ts.map +1 -1
  73. package/lib/services/hostnames.js +16 -4
  74. package/lib/services/hostnames.js.map +1 -1
  75. package/lib/services/hyperdrive.d.ts +223 -11
  76. package/lib/services/hyperdrive.d.ts.map +1 -1
  77. package/lib/services/hyperdrive.js +351 -11
  78. package/lib/services/hyperdrive.js.map +1 -1
  79. package/lib/services/iam.d.ts +62 -2
  80. package/lib/services/iam.d.ts.map +1 -1
  81. package/lib/services/iam.js +82 -11
  82. package/lib/services/iam.js.map +1 -1
  83. package/lib/services/images.d.ts +9 -1
  84. package/lib/services/images.d.ts.map +1 -1
  85. package/lib/services/images.js +12 -1
  86. package/lib/services/images.js.map +1 -1
  87. package/lib/services/intel.d.ts +4 -4
  88. package/lib/services/intel.d.ts.map +1 -1
  89. package/lib/services/intel.js +2 -3
  90. package/lib/services/intel.js.map +1 -1
  91. package/lib/services/kv.d.ts.map +1 -1
  92. package/lib/services/kv.js +2 -2
  93. package/lib/services/kv.js.map +1 -1
  94. package/lib/services/load-balancers.d.ts +537 -108
  95. package/lib/services/load-balancers.d.ts.map +1 -1
  96. package/lib/services/load-balancers.js +1266 -161
  97. package/lib/services/load-balancers.js.map +1 -1
  98. package/lib/services/logpush.d.ts +153 -9
  99. package/lib/services/logpush.d.ts.map +1 -1
  100. package/lib/services/logpush.js +246 -9
  101. package/lib/services/logpush.js.map +1 -1
  102. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  103. package/lib/services/magic-cloud-networking.js +54 -30
  104. package/lib/services/magic-cloud-networking.js.map +1 -1
  105. package/lib/services/magic-network-monitoring.d.ts +46 -5
  106. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  107. package/lib/services/magic-network-monitoring.js +79 -5
  108. package/lib/services/magic-network-monitoring.js.map +1 -1
  109. package/lib/services/magic-transit.d.ts +127 -21
  110. package/lib/services/magic-transit.d.ts.map +1 -1
  111. package/lib/services/magic-transit.js +291 -29
  112. package/lib/services/magic-transit.js.map +1 -1
  113. package/lib/services/memberships.d.ts +248 -52
  114. package/lib/services/memberships.d.ts.map +1 -1
  115. package/lib/services/memberships.js +360 -39
  116. package/lib/services/memberships.js.map +1 -1
  117. package/lib/services/page-rules.d.ts +432 -8
  118. package/lib/services/page-rules.d.ts.map +1 -1
  119. package/lib/services/page-rules.js +877 -33
  120. package/lib/services/page-rules.js.map +1 -1
  121. package/lib/services/pages.d.ts +457 -297
  122. package/lib/services/pages.d.ts.map +1 -1
  123. package/lib/services/pages.js +1366 -491
  124. package/lib/services/pages.js.map +1 -1
  125. package/lib/services/pipelines.d.ts +96 -76
  126. package/lib/services/pipelines.d.ts.map +1 -1
  127. package/lib/services/pipelines.js +145 -197
  128. package/lib/services/pipelines.js.map +1 -1
  129. package/lib/services/queues.d.ts +228 -12
  130. package/lib/services/queues.d.ts.map +1 -1
  131. package/lib/services/queues.js +487 -11
  132. package/lib/services/queues.js.map +1 -1
  133. package/lib/services/radar.d.ts +82 -18
  134. package/lib/services/radar.d.ts.map +1 -1
  135. package/lib/services/radar.js +111 -47
  136. package/lib/services/radar.js.map +1 -1
  137. package/lib/services/realtime-kit.d.ts +650 -334
  138. package/lib/services/realtime-kit.d.ts.map +1 -1
  139. package/lib/services/realtime-kit.js +1472 -693
  140. package/lib/services/realtime-kit.js.map +1 -1
  141. package/lib/services/request-tracers.d.ts +12 -1
  142. package/lib/services/request-tracers.d.ts.map +1 -1
  143. package/lib/services/request-tracers.js +28 -3
  144. package/lib/services/request-tracers.js.map +1 -1
  145. package/lib/services/rules.d.ts +65 -10
  146. package/lib/services/rules.d.ts.map +1 -1
  147. package/lib/services/rules.js +102 -8
  148. package/lib/services/rules.js.map +1 -1
  149. package/lib/services/rulesets.d.ts +7892 -1806
  150. package/lib/services/rulesets.d.ts.map +1 -1
  151. package/lib/services/rulesets.js +18720 -4149
  152. package/lib/services/rulesets.js.map +1 -1
  153. package/lib/services/rum.d.ts +45 -5
  154. package/lib/services/rum.d.ts.map +1 -1
  155. package/lib/services/rum.js +80 -4
  156. package/lib/services/rum.js.map +1 -1
  157. package/lib/services/schema-validation.js +2 -2
  158. package/lib/services/schema-validation.js.map +1 -1
  159. package/lib/services/spectrum.d.ts +139 -33
  160. package/lib/services/spectrum.d.ts.map +1 -1
  161. package/lib/services/spectrum.js +190 -34
  162. package/lib/services/spectrum.js.map +1 -1
  163. package/lib/services/speed.d.ts +345 -24
  164. package/lib/services/speed.d.ts.map +1 -1
  165. package/lib/services/speed.js +785 -19
  166. package/lib/services/speed.js.map +1 -1
  167. package/lib/services/ssl.d.ts +6 -6
  168. package/lib/services/ssl.d.ts.map +1 -1
  169. package/lib/services/ssl.js +5 -5
  170. package/lib/services/ssl.js.map +1 -1
  171. package/lib/services/stream.d.ts +171 -17
  172. package/lib/services/stream.d.ts.map +1 -1
  173. package/lib/services/stream.js +164 -11
  174. package/lib/services/stream.js.map +1 -1
  175. package/lib/services/token-validation.d.ts +16 -2
  176. package/lib/services/token-validation.d.ts.map +1 -1
  177. package/lib/services/token-validation.js +32 -2
  178. package/lib/services/token-validation.js.map +1 -1
  179. package/lib/services/url-scanner.d.ts +43 -11
  180. package/lib/services/url-scanner.d.ts.map +1 -1
  181. package/lib/services/url-scanner.js +46 -11
  182. package/lib/services/url-scanner.js.map +1 -1
  183. package/lib/services/user.d.ts +312 -21
  184. package/lib/services/user.d.ts.map +1 -1
  185. package/lib/services/user.js +442 -19
  186. package/lib/services/user.js.map +1 -1
  187. package/lib/services/workers-for-platforms.d.ts +223 -13
  188. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  189. package/lib/services/workers-for-platforms.js +481 -13
  190. package/lib/services/workers-for-platforms.js.map +1 -1
  191. package/lib/services/workers.d.ts +345 -31
  192. package/lib/services/workers.d.ts.map +1 -1
  193. package/lib/services/workers.js +649 -34
  194. package/lib/services/workers.js.map +1 -1
  195. package/lib/services/zaraz.d.ts +212 -11
  196. package/lib/services/zaraz.d.ts.map +1 -1
  197. package/lib/services/zaraz.js +311 -30
  198. package/lib/services/zaraz.js.map +1 -1
  199. package/lib/services/zero-trust.d.ts +19333 -1905
  200. package/lib/services/zero-trust.d.ts.map +1 -1
  201. package/lib/services/zero-trust.js +30269 -5710
  202. package/lib/services/zero-trust.js.map +1 -1
  203. package/lib/services/zones.d.ts +61 -7
  204. package/lib/services/zones.d.ts.map +1 -1
  205. package/lib/services/zones.js +188 -7
  206. package/lib/services/zones.js.map +1 -1
  207. package/package.json +2 -2
  208. package/src/services/accounts.ts +2897 -63
  209. package/src/services/addressing.ts +28 -4
  210. package/src/services/ai-gateway.ts +9 -7
  211. package/src/services/aisearch.ts +28 -9
  212. package/src/services/alerting.ts +2 -2
  213. package/src/services/api-gateway.ts +410 -27
  214. package/src/services/audit-logs.ts +135 -5
  215. package/src/services/bot-management.ts +282 -24
  216. package/src/services/brand-protection.ts +28 -8
  217. package/src/services/browser-rendering.ts +31 -11
  218. package/src/services/cloudforce-one.ts +201 -9
  219. package/src/services/custom-certificates.ts +405 -14
  220. package/src/services/custom-hostnames.ts +29 -22
  221. package/src/services/d1.ts +180 -12
  222. package/src/services/dns-firewall.ts +163 -7
  223. package/src/services/dns.ts +213 -2389
  224. package/src/services/email-routing.ts +346 -12
  225. package/src/services/firewall.ts +556 -72
  226. package/src/services/healthchecks.ts +463 -18
  227. package/src/services/hostnames.ts +21 -9
  228. package/src/services/hyperdrive.ts +730 -17
  229. package/src/services/iam.ts +228 -24
  230. package/src/services/images.ts +29 -2
  231. package/src/services/intel.ts +6 -5
  232. package/src/services/kv.ts +6 -2
  233. package/src/services/load-balancers.ts +2387 -294
  234. package/src/services/logpush.ts +659 -15
  235. package/src/services/magic-cloud-networking.ts +74 -30
  236. package/src/services/magic-network-monitoring.ts +170 -8
  237. package/src/services/magic-transit.ts +631 -62
  238. package/src/services/memberships.ts +710 -91
  239. package/src/services/page-rules.ts +1592 -88
  240. package/src/services/pages.ts +2011 -1098
  241. package/src/services/pipelines.ts +285 -331
  242. package/src/services/queues.ts +1110 -22
  243. package/src/services/radar.ts +128 -64
  244. package/src/services/realtime-kit.ts +2829 -1603
  245. package/src/services/request-tracers.ts +54 -4
  246. package/src/services/rules.ts +214 -18
  247. package/src/services/rulesets.ts +34524 -6913
  248. package/src/services/rum.ts +187 -9
  249. package/src/services/schema-validation.ts +2 -2
  250. package/src/services/spectrum.ts +357 -67
  251. package/src/services/speed.ts +1845 -42
  252. package/src/services/ssl.ts +11 -11
  253. package/src/services/stream.ts +397 -22
  254. package/src/services/token-validation.ts +64 -4
  255. package/src/services/url-scanner.ts +92 -20
  256. package/src/services/user.ts +973 -34
  257. package/src/services/workers-for-platforms.ts +1012 -39
  258. package/src/services/workers.ts +1472 -120
  259. package/src/services/zaraz.ts +640 -37
  260. package/src/services/zero-trust.ts +55498 -12667
  261. package/src/services/zones.ts +360 -14
@@ -344,7 +344,88 @@ export interface GetDispatchNamespaceScriptResponse {
344
344
  dispatchNamespace?: string | null;
345
345
  /** When the script was last modified. */
346
346
  modifiedOn?: string | null;
347
- script?: unknown | null;
347
+ script?: {
348
+ id?: string | null;
349
+ compatibilityDate?: string | null;
350
+ compatibilityFlags?: string[] | null;
351
+ createdOn?: string | null;
352
+ etag?: string | null;
353
+ handlers?: string[] | null;
354
+ hasAssets?: boolean | null;
355
+ hasModules?: boolean | null;
356
+ lastDeployedFrom?: string | null;
357
+ logpush?: boolean | null;
358
+ migrationTag?: string | null;
359
+ modifiedOn?: string | null;
360
+ namedHandlers?:
361
+ | { handlers?: string[] | null; name?: string | null }[]
362
+ | null;
363
+ observability?: {
364
+ enabled: boolean;
365
+ headSamplingRate?: number | null;
366
+ logs?: {
367
+ enabled: boolean;
368
+ invocationLogs: boolean;
369
+ destinations?: string[] | null;
370
+ headSamplingRate?: number | null;
371
+ persist?: boolean | null;
372
+ } | null;
373
+ } | null;
374
+ placement?:
375
+ | {
376
+ mode: "smart";
377
+ lastAnalyzedAt?: string | null;
378
+ status?:
379
+ | "SUCCESS"
380
+ | "UNSUPPORTED_APPLICATION"
381
+ | "INSUFFICIENT_INVOCATIONS"
382
+ | null;
383
+ }
384
+ | {
385
+ region: string;
386
+ lastAnalyzedAt?: string | null;
387
+ status?:
388
+ | "SUCCESS"
389
+ | "UNSUPPORTED_APPLICATION"
390
+ | "INSUFFICIENT_INVOCATIONS"
391
+ | null;
392
+ }
393
+ | {
394
+ hostname: string;
395
+ lastAnalyzedAt?: string | null;
396
+ status?:
397
+ | "SUCCESS"
398
+ | "UNSUPPORTED_APPLICATION"
399
+ | "INSUFFICIENT_INVOCATIONS"
400
+ | null;
401
+ }
402
+ | {
403
+ host: string;
404
+ lastAnalyzedAt?: string | null;
405
+ status?:
406
+ | "SUCCESS"
407
+ | "UNSUPPORTED_APPLICATION"
408
+ | "INSUFFICIENT_INVOCATIONS"
409
+ | null;
410
+ }
411
+ | null;
412
+ placementMode?: "smart" | null;
413
+ placementStatus?:
414
+ | "SUCCESS"
415
+ | "UNSUPPORTED_APPLICATION"
416
+ | "INSUFFICIENT_INVOCATIONS"
417
+ | null;
418
+ tag?: string | null;
419
+ tags?: string[] | null;
420
+ tailConsumers?:
421
+ | {
422
+ service: string;
423
+ environment?: string | null;
424
+ namespace?: string | null;
425
+ }[]
426
+ | null;
427
+ usageModel?: "standard" | "bundled" | "unbound" | null;
428
+ } | null;
348
429
  }
349
430
 
350
431
  export const GetDispatchNamespaceScriptResponse =
@@ -354,7 +435,262 @@ export const GetDispatchNamespaceScriptResponse =
354
435
  Schema.Union([Schema.String, Schema.Null]),
355
436
  ),
356
437
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
357
- script: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
438
+ script: Schema.optional(
439
+ Schema.Union([
440
+ Schema.Struct({
441
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
442
+ compatibilityDate: Schema.optional(
443
+ Schema.Union([Schema.String, Schema.Null]),
444
+ ),
445
+ compatibilityFlags: Schema.optional(
446
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
447
+ ),
448
+ createdOn: Schema.optional(
449
+ Schema.Union([Schema.String, Schema.Null]),
450
+ ),
451
+ etag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
452
+ handlers: Schema.optional(
453
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
454
+ ),
455
+ hasAssets: Schema.optional(
456
+ Schema.Union([Schema.Boolean, Schema.Null]),
457
+ ),
458
+ hasModules: Schema.optional(
459
+ Schema.Union([Schema.Boolean, Schema.Null]),
460
+ ),
461
+ lastDeployedFrom: Schema.optional(
462
+ Schema.Union([Schema.String, Schema.Null]),
463
+ ),
464
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
465
+ migrationTag: Schema.optional(
466
+ Schema.Union([Schema.String, Schema.Null]),
467
+ ),
468
+ modifiedOn: Schema.optional(
469
+ Schema.Union([Schema.String, Schema.Null]),
470
+ ),
471
+ namedHandlers: Schema.optional(
472
+ Schema.Union([
473
+ Schema.Array(
474
+ Schema.Struct({
475
+ handlers: Schema.optional(
476
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
477
+ ),
478
+ name: Schema.optional(
479
+ Schema.Union([Schema.String, Schema.Null]),
480
+ ),
481
+ }),
482
+ ),
483
+ Schema.Null,
484
+ ]),
485
+ ),
486
+ observability: Schema.optional(
487
+ Schema.Union([
488
+ Schema.Struct({
489
+ enabled: Schema.Boolean,
490
+ headSamplingRate: Schema.optional(
491
+ Schema.Union([Schema.Number, Schema.Null]),
492
+ ),
493
+ logs: Schema.optional(
494
+ Schema.Union([
495
+ Schema.Struct({
496
+ enabled: Schema.Boolean,
497
+ invocationLogs: Schema.Boolean,
498
+ destinations: Schema.optional(
499
+ Schema.Union([
500
+ Schema.Array(Schema.String),
501
+ Schema.Null,
502
+ ]),
503
+ ),
504
+ headSamplingRate: Schema.optional(
505
+ Schema.Union([Schema.Number, Schema.Null]),
506
+ ),
507
+ persist: Schema.optional(
508
+ Schema.Union([Schema.Boolean, Schema.Null]),
509
+ ),
510
+ }).pipe(
511
+ Schema.encodeKeys({
512
+ enabled: "enabled",
513
+ invocationLogs: "invocation_logs",
514
+ destinations: "destinations",
515
+ headSamplingRate: "head_sampling_rate",
516
+ persist: "persist",
517
+ }),
518
+ ),
519
+ Schema.Null,
520
+ ]),
521
+ ),
522
+ }).pipe(
523
+ Schema.encodeKeys({
524
+ enabled: "enabled",
525
+ headSamplingRate: "head_sampling_rate",
526
+ logs: "logs",
527
+ }),
528
+ ),
529
+ Schema.Null,
530
+ ]),
531
+ ),
532
+ placement: Schema.optional(
533
+ Schema.Union([
534
+ Schema.Union([
535
+ Schema.Struct({
536
+ mode: Schema.Literal("smart"),
537
+ lastAnalyzedAt: Schema.optional(
538
+ Schema.Union([Schema.String, Schema.Null]),
539
+ ),
540
+ status: Schema.optional(
541
+ Schema.Union([
542
+ Schema.Literals([
543
+ "SUCCESS",
544
+ "UNSUPPORTED_APPLICATION",
545
+ "INSUFFICIENT_INVOCATIONS",
546
+ ]),
547
+ Schema.Null,
548
+ ]),
549
+ ),
550
+ }).pipe(
551
+ Schema.encodeKeys({
552
+ mode: "mode",
553
+ lastAnalyzedAt: "last_analyzed_at",
554
+ status: "status",
555
+ }),
556
+ ),
557
+ Schema.Struct({
558
+ region: Schema.String,
559
+ lastAnalyzedAt: Schema.optional(
560
+ Schema.Union([Schema.String, Schema.Null]),
561
+ ),
562
+ status: Schema.optional(
563
+ Schema.Union([
564
+ Schema.Literals([
565
+ "SUCCESS",
566
+ "UNSUPPORTED_APPLICATION",
567
+ "INSUFFICIENT_INVOCATIONS",
568
+ ]),
569
+ Schema.Null,
570
+ ]),
571
+ ),
572
+ }).pipe(
573
+ Schema.encodeKeys({
574
+ region: "region",
575
+ lastAnalyzedAt: "last_analyzed_at",
576
+ status: "status",
577
+ }),
578
+ ),
579
+ Schema.Struct({
580
+ hostname: Schema.String,
581
+ lastAnalyzedAt: Schema.optional(
582
+ Schema.Union([Schema.String, Schema.Null]),
583
+ ),
584
+ status: Schema.optional(
585
+ Schema.Union([
586
+ Schema.Literals([
587
+ "SUCCESS",
588
+ "UNSUPPORTED_APPLICATION",
589
+ "INSUFFICIENT_INVOCATIONS",
590
+ ]),
591
+ Schema.Null,
592
+ ]),
593
+ ),
594
+ }).pipe(
595
+ Schema.encodeKeys({
596
+ hostname: "hostname",
597
+ lastAnalyzedAt: "last_analyzed_at",
598
+ status: "status",
599
+ }),
600
+ ),
601
+ Schema.Struct({
602
+ host: Schema.String,
603
+ lastAnalyzedAt: Schema.optional(
604
+ Schema.Union([Schema.String, Schema.Null]),
605
+ ),
606
+ status: Schema.optional(
607
+ Schema.Union([
608
+ Schema.Literals([
609
+ "SUCCESS",
610
+ "UNSUPPORTED_APPLICATION",
611
+ "INSUFFICIENT_INVOCATIONS",
612
+ ]),
613
+ Schema.Null,
614
+ ]),
615
+ ),
616
+ }).pipe(
617
+ Schema.encodeKeys({
618
+ host: "host",
619
+ lastAnalyzedAt: "last_analyzed_at",
620
+ status: "status",
621
+ }),
622
+ ),
623
+ ]),
624
+ Schema.Null,
625
+ ]),
626
+ ),
627
+ placementMode: Schema.optional(
628
+ Schema.Union([Schema.Literal("smart"), Schema.Null]),
629
+ ),
630
+ placementStatus: Schema.optional(
631
+ Schema.Union([
632
+ Schema.Literals([
633
+ "SUCCESS",
634
+ "UNSUPPORTED_APPLICATION",
635
+ "INSUFFICIENT_INVOCATIONS",
636
+ ]),
637
+ Schema.Null,
638
+ ]),
639
+ ),
640
+ tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
641
+ tags: Schema.optional(
642
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
643
+ ),
644
+ tailConsumers: Schema.optional(
645
+ Schema.Union([
646
+ Schema.Array(
647
+ Schema.Struct({
648
+ service: Schema.String,
649
+ environment: Schema.optional(
650
+ Schema.Union([Schema.String, Schema.Null]),
651
+ ),
652
+ namespace: Schema.optional(
653
+ Schema.Union([Schema.String, Schema.Null]),
654
+ ),
655
+ }),
656
+ ),
657
+ Schema.Null,
658
+ ]),
659
+ ),
660
+ usageModel: Schema.optional(
661
+ Schema.Union([
662
+ Schema.Literals(["standard", "bundled", "unbound"]),
663
+ Schema.Null,
664
+ ]),
665
+ ),
666
+ }).pipe(
667
+ Schema.encodeKeys({
668
+ id: "id",
669
+ compatibilityDate: "compatibility_date",
670
+ compatibilityFlags: "compatibility_flags",
671
+ createdOn: "created_on",
672
+ etag: "etag",
673
+ handlers: "handlers",
674
+ hasAssets: "has_assets",
675
+ hasModules: "has_modules",
676
+ lastDeployedFrom: "last_deployed_from",
677
+ logpush: "logpush",
678
+ migrationTag: "migration_tag",
679
+ modifiedOn: "modified_on",
680
+ namedHandlers: "named_handlers",
681
+ observability: "observability",
682
+ placement: "placement",
683
+ placementMode: "placement_mode",
684
+ placementStatus: "placement_status",
685
+ tag: "tag",
686
+ tags: "tags",
687
+ tailConsumers: "tail_consumers",
688
+ usageModel: "usage_model",
689
+ }),
690
+ ),
691
+ Schema.Null,
692
+ ]),
693
+ ),
358
694
  })
359
695
  .pipe(
360
696
  Schema.encodeKeys({
@@ -496,8 +832,34 @@ export interface PutDispatchNamespaceScriptRequest {
496
832
  logpush?: boolean;
497
833
  mainModule?: string;
498
834
  migrations?:
499
- | unknown
500
- | { newTag?: string; oldTag?: string; steps?: unknown[] };
835
+ | {
836
+ deletedClasses?: string[];
837
+ newClasses?: string[];
838
+ newSqliteClasses?: string[];
839
+ newTag?: string;
840
+ oldTag?: string;
841
+ renamedClasses?: { from?: string; to?: string }[];
842
+ transferredClasses?: {
843
+ from?: string;
844
+ fromScript?: string;
845
+ to?: string;
846
+ }[];
847
+ }
848
+ | {
849
+ newTag?: string;
850
+ oldTag?: string;
851
+ steps?: {
852
+ deletedClasses?: string[];
853
+ newClasses?: string[];
854
+ newSqliteClasses?: string[];
855
+ renamedClasses?: { from?: string; to?: string }[];
856
+ transferredClasses?: {
857
+ from?: string;
858
+ fromScript?: string;
859
+ to?: string;
860
+ }[];
861
+ }[];
862
+ };
501
863
  observability?: {
502
864
  enabled: boolean;
503
865
  headSamplingRate?: number | null;
@@ -515,7 +877,9 @@ export interface PutDispatchNamespaceScriptRequest {
515
877
  | { hostname: string }
516
878
  | { host: string };
517
879
  tags?: string[];
518
- tailConsumers?: unknown[] | null;
880
+ tailConsumers?:
881
+ | { service: string; environment?: string; namespace?: string }[]
882
+ | null;
519
883
  usageModel?: "standard" | "bundled" | "unbound";
520
884
  };
521
885
  /** Body param: An array of modules (often JavaScript files) comprising a Worker script. At least one module must be present and referenced in the metadata as `main_module` or `body_part` by filename.<br/ */
@@ -843,11 +1207,91 @@ export const PutDispatchNamespaceScriptRequest =
843
1207
  mainModule: Schema.optional(Schema.String),
844
1208
  migrations: Schema.optional(
845
1209
  Schema.Union([
846
- Schema.Unknown,
847
1210
  Schema.Struct({
1211
+ deletedClasses: Schema.optional(Schema.Array(Schema.String)),
1212
+ newClasses: Schema.optional(Schema.Array(Schema.String)),
1213
+ newSqliteClasses: Schema.optional(Schema.Array(Schema.String)),
848
1214
  newTag: Schema.optional(Schema.String),
849
1215
  oldTag: Schema.optional(Schema.String),
850
- steps: Schema.optional(Schema.Array(Schema.Unknown)),
1216
+ renamedClasses: Schema.optional(
1217
+ Schema.Array(
1218
+ Schema.Struct({
1219
+ from: Schema.optional(Schema.String),
1220
+ to: Schema.optional(Schema.String),
1221
+ }),
1222
+ ),
1223
+ ),
1224
+ transferredClasses: Schema.optional(
1225
+ Schema.Array(
1226
+ Schema.Struct({
1227
+ from: Schema.optional(Schema.String),
1228
+ fromScript: Schema.optional(Schema.String),
1229
+ to: Schema.optional(Schema.String),
1230
+ }).pipe(
1231
+ Schema.encodeKeys({
1232
+ from: "from",
1233
+ fromScript: "from_script",
1234
+ to: "to",
1235
+ }),
1236
+ ),
1237
+ ),
1238
+ ),
1239
+ }).pipe(
1240
+ Schema.encodeKeys({
1241
+ deletedClasses: "deleted_classes",
1242
+ newClasses: "new_classes",
1243
+ newSqliteClasses: "new_sqlite_classes",
1244
+ newTag: "new_tag",
1245
+ oldTag: "old_tag",
1246
+ renamedClasses: "renamed_classes",
1247
+ transferredClasses: "transferred_classes",
1248
+ }),
1249
+ ),
1250
+ Schema.Struct({
1251
+ newTag: Schema.optional(Schema.String),
1252
+ oldTag: Schema.optional(Schema.String),
1253
+ steps: Schema.optional(
1254
+ Schema.Array(
1255
+ Schema.Struct({
1256
+ deletedClasses: Schema.optional(Schema.Array(Schema.String)),
1257
+ newClasses: Schema.optional(Schema.Array(Schema.String)),
1258
+ newSqliteClasses: Schema.optional(
1259
+ Schema.Array(Schema.String),
1260
+ ),
1261
+ renamedClasses: Schema.optional(
1262
+ Schema.Array(
1263
+ Schema.Struct({
1264
+ from: Schema.optional(Schema.String),
1265
+ to: Schema.optional(Schema.String),
1266
+ }),
1267
+ ),
1268
+ ),
1269
+ transferredClasses: Schema.optional(
1270
+ Schema.Array(
1271
+ Schema.Struct({
1272
+ from: Schema.optional(Schema.String),
1273
+ fromScript: Schema.optional(Schema.String),
1274
+ to: Schema.optional(Schema.String),
1275
+ }).pipe(
1276
+ Schema.encodeKeys({
1277
+ from: "from",
1278
+ fromScript: "from_script",
1279
+ to: "to",
1280
+ }),
1281
+ ),
1282
+ ),
1283
+ ),
1284
+ }).pipe(
1285
+ Schema.encodeKeys({
1286
+ deletedClasses: "deleted_classes",
1287
+ newClasses: "new_classes",
1288
+ newSqliteClasses: "new_sqlite_classes",
1289
+ renamedClasses: "renamed_classes",
1290
+ transferredClasses: "transferred_classes",
1291
+ }),
1292
+ ),
1293
+ ),
1294
+ ),
851
1295
  }).pipe(
852
1296
  Schema.encodeKeys({
853
1297
  newTag: "new_tag",
@@ -911,7 +1355,16 @@ export const PutDispatchNamespaceScriptRequest =
911
1355
  ),
912
1356
  tags: Schema.optional(Schema.Array(Schema.String)),
913
1357
  tailConsumers: Schema.optional(
914
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1358
+ Schema.Union([
1359
+ Schema.Array(
1360
+ Schema.Struct({
1361
+ service: Schema.String,
1362
+ environment: Schema.optional(Schema.String),
1363
+ namespace: Schema.optional(Schema.String),
1364
+ }),
1365
+ ),
1366
+ Schema.Null,
1367
+ ]),
915
1368
  ),
916
1369
  usageModel: Schema.optional(
917
1370
  Schema.Literals(["standard", "bundled", "unbound"]),
@@ -1041,7 +1494,13 @@ export interface PutDispatchNamespaceScriptResponse {
1041
1494
  /** Tags associated with the Worker. */
1042
1495
  tags?: string[] | null;
1043
1496
  /** List of Workers that will consume logs from the attached Worker. */
1044
- tailConsumers?: unknown[] | null;
1497
+ tailConsumers?:
1498
+ | {
1499
+ service: string;
1500
+ environment?: string | null;
1501
+ namespace?: string | null;
1502
+ }[]
1503
+ | null;
1045
1504
  /** Usage model for the Worker invocations. */
1046
1505
  usageModel?: "standard" | "bundled" | "unbound" | null;
1047
1506
  }
@@ -1239,7 +1698,20 @@ export const PutDispatchNamespaceScriptResponse =
1239
1698
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1240
1699
  ),
1241
1700
  tailConsumers: Schema.optional(
1242
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1701
+ Schema.Union([
1702
+ Schema.Array(
1703
+ Schema.Struct({
1704
+ service: Schema.String,
1705
+ environment: Schema.optional(
1706
+ Schema.Union([Schema.String, Schema.Null]),
1707
+ ),
1708
+ namespace: Schema.optional(
1709
+ Schema.Union([Schema.String, Schema.Null]),
1710
+ ),
1711
+ }),
1712
+ ),
1713
+ Schema.Null,
1714
+ ]),
1243
1715
  ),
1244
1716
  usageModel: Schema.optional(
1245
1717
  Schema.Union([
@@ -1352,7 +1824,7 @@ export const CreateDispatchNamespaceScriptAssetUploadRequest =
1352
1824
  dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1353
1825
  scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1354
1826
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1355
- manifest: Schema.Struct({}),
1827
+ manifest: Schema.Record(Schema.String, Schema.Unknown),
1356
1828
  }).pipe(
1357
1829
  T.Http({
1358
1830
  method: "POST",
@@ -1967,7 +2439,7 @@ export interface PutDispatchNamespaceScriptContentRequest {
1967
2439
  /** Header param: The multipart name of a script upload part containing script content in es module format. Alternative to including in a metadata part. */
1968
2440
  cfworkermainmodulepart?: string;
1969
2441
  /** Body param: JSON-encoded metadata about the uploaded parts and Worker configuration. */
1970
- metadata: unknown;
2442
+ metadata: { bodyPart?: string; mainModule?: string };
1971
2443
  /** Body param: An array of modules (often JavaScript files) comprising a Worker script. At least one module must be present and referenced in the metadata as `main_module` or `body_part` by filename.<br/ */
1972
2444
  files?: (File | Blob)[];
1973
2445
  }
@@ -1980,25 +2452,369 @@ export const PutDispatchNamespaceScriptContentRequest =
1980
2452
  cfworkerbodypart: Schema.optional(Schema.String).pipe(
1981
2453
  T.HttpHeader("CF-WORKER-BODY-PART"),
1982
2454
  ),
1983
- cfworkermainmodulepart: Schema.optional(Schema.String).pipe(
1984
- T.HttpHeader("CF-WORKER-MAIN-MODULE-PART"),
2455
+ cfworkermainmodulepart: Schema.optional(Schema.String).pipe(
2456
+ T.HttpHeader("CF-WORKER-MAIN-MODULE-PART"),
2457
+ ),
2458
+ metadata: Schema.Struct({
2459
+ bodyPart: Schema.optional(Schema.String),
2460
+ mainModule: Schema.optional(Schema.String),
2461
+ }).pipe(
2462
+ Schema.encodeKeys({ bodyPart: "body_part", mainModule: "main_module" }),
2463
+ ),
2464
+ files: Schema.optional(
2465
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
2466
+ ),
2467
+ }).pipe(
2468
+ T.Http({
2469
+ method: "PUT",
2470
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/content",
2471
+ contentType: "multipart",
2472
+ }),
2473
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptContentRequest>;
2474
+
2475
+ export interface PutDispatchNamespaceScriptContentResponse {
2476
+ /** The name used to identify the script. */
2477
+ id?: string | null;
2478
+ /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
2479
+ compatibilityDate?: string | null;
2480
+ /** Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibility_date`. */
2481
+ compatibilityFlags?: string[] | null;
2482
+ /** When the script was created. */
2483
+ createdOn?: string | null;
2484
+ /** Hashed script content, can be used in a If-None-Match header when updating. */
2485
+ etag?: string | null;
2486
+ /** The names of handlers exported as part of the default export. */
2487
+ handlers?: string[] | null;
2488
+ /** Whether a Worker contains assets. */
2489
+ hasAssets?: boolean | null;
2490
+ /** Whether a Worker contains modules. */
2491
+ hasModules?: boolean | null;
2492
+ /** The client most recently used to deploy this Worker. */
2493
+ lastDeployedFrom?: string | null;
2494
+ /** Whether Logpush is turned on for the Worker. */
2495
+ logpush?: boolean | null;
2496
+ /** The tag of the Durable Object migration that was most recently applied for this Worker. */
2497
+ migrationTag?: string | null;
2498
+ /** When the script was last modified. */
2499
+ modifiedOn?: string | null;
2500
+ /** Named exports, such as Durable Object class implementations and named entrypoints. */
2501
+ namedHandlers?: { handlers?: string[] | null; name?: string | null }[] | null;
2502
+ /** Observability settings for the Worker. */
2503
+ observability?: {
2504
+ enabled: boolean;
2505
+ headSamplingRate?: number | null;
2506
+ logs?: {
2507
+ enabled: boolean;
2508
+ invocationLogs: boolean;
2509
+ destinations?: string[] | null;
2510
+ headSamplingRate?: number | null;
2511
+ persist?: boolean | null;
2512
+ } | null;
2513
+ } | null;
2514
+ /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
2515
+ placement?:
2516
+ | {
2517
+ mode: "smart";
2518
+ lastAnalyzedAt?: string | null;
2519
+ status?:
2520
+ | "SUCCESS"
2521
+ | "UNSUPPORTED_APPLICATION"
2522
+ | "INSUFFICIENT_INVOCATIONS"
2523
+ | null;
2524
+ }
2525
+ | {
2526
+ region: string;
2527
+ lastAnalyzedAt?: string | null;
2528
+ status?:
2529
+ | "SUCCESS"
2530
+ | "UNSUPPORTED_APPLICATION"
2531
+ | "INSUFFICIENT_INVOCATIONS"
2532
+ | null;
2533
+ }
2534
+ | {
2535
+ hostname: string;
2536
+ lastAnalyzedAt?: string | null;
2537
+ status?:
2538
+ | "SUCCESS"
2539
+ | "UNSUPPORTED_APPLICATION"
2540
+ | "INSUFFICIENT_INVOCATIONS"
2541
+ | null;
2542
+ }
2543
+ | {
2544
+ host: string;
2545
+ lastAnalyzedAt?: string | null;
2546
+ status?:
2547
+ | "SUCCESS"
2548
+ | "UNSUPPORTED_APPLICATION"
2549
+ | "INSUFFICIENT_INVOCATIONS"
2550
+ | null;
2551
+ }
2552
+ | null;
2553
+ /** @deprecated Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */
2554
+ placementMode?: "smart" | null;
2555
+ /** @deprecated Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */
2556
+ placementStatus?:
2557
+ | "SUCCESS"
2558
+ | "UNSUPPORTED_APPLICATION"
2559
+ | "INSUFFICIENT_INVOCATIONS"
2560
+ | null;
2561
+ /** The immutable ID of the script. */
2562
+ tag?: string | null;
2563
+ /** Tags associated with the Worker. */
2564
+ tags?: string[] | null;
2565
+ /** List of Workers that will consume logs from the attached Worker. */
2566
+ tailConsumers?:
2567
+ | {
2568
+ service: string;
2569
+ environment?: string | null;
2570
+ namespace?: string | null;
2571
+ }[]
2572
+ | null;
2573
+ /** Usage model for the Worker invocations. */
2574
+ usageModel?: "standard" | "bundled" | "unbound" | null;
2575
+ }
2576
+
2577
+ export const PutDispatchNamespaceScriptContentResponse =
2578
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2579
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2580
+ compatibilityDate: Schema.optional(
2581
+ Schema.Union([Schema.String, Schema.Null]),
2582
+ ),
2583
+ compatibilityFlags: Schema.optional(
2584
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2585
+ ),
2586
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2587
+ etag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2588
+ handlers: Schema.optional(
2589
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2590
+ ),
2591
+ hasAssets: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2592
+ hasModules: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2593
+ lastDeployedFrom: Schema.optional(
2594
+ Schema.Union([Schema.String, Schema.Null]),
2595
+ ),
2596
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2597
+ migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2598
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2599
+ namedHandlers: Schema.optional(
2600
+ Schema.Union([
2601
+ Schema.Array(
2602
+ Schema.Struct({
2603
+ handlers: Schema.optional(
2604
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2605
+ ),
2606
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2607
+ }),
2608
+ ),
2609
+ Schema.Null,
2610
+ ]),
2611
+ ),
2612
+ observability: Schema.optional(
2613
+ Schema.Union([
2614
+ Schema.Struct({
2615
+ enabled: Schema.Boolean,
2616
+ headSamplingRate: Schema.optional(
2617
+ Schema.Union([Schema.Number, Schema.Null]),
2618
+ ),
2619
+ logs: Schema.optional(
2620
+ Schema.Union([
2621
+ Schema.Struct({
2622
+ enabled: Schema.Boolean,
2623
+ invocationLogs: Schema.Boolean,
2624
+ destinations: Schema.optional(
2625
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2626
+ ),
2627
+ headSamplingRate: Schema.optional(
2628
+ Schema.Union([Schema.Number, Schema.Null]),
2629
+ ),
2630
+ persist: Schema.optional(
2631
+ Schema.Union([Schema.Boolean, Schema.Null]),
2632
+ ),
2633
+ }).pipe(
2634
+ Schema.encodeKeys({
2635
+ enabled: "enabled",
2636
+ invocationLogs: "invocation_logs",
2637
+ destinations: "destinations",
2638
+ headSamplingRate: "head_sampling_rate",
2639
+ persist: "persist",
2640
+ }),
2641
+ ),
2642
+ Schema.Null,
2643
+ ]),
2644
+ ),
2645
+ }).pipe(
2646
+ Schema.encodeKeys({
2647
+ enabled: "enabled",
2648
+ headSamplingRate: "head_sampling_rate",
2649
+ logs: "logs",
2650
+ }),
2651
+ ),
2652
+ Schema.Null,
2653
+ ]),
2654
+ ),
2655
+ placement: Schema.optional(
2656
+ Schema.Union([
2657
+ Schema.Union([
2658
+ Schema.Struct({
2659
+ mode: Schema.Literal("smart"),
2660
+ lastAnalyzedAt: Schema.optional(
2661
+ Schema.Union([Schema.String, Schema.Null]),
2662
+ ),
2663
+ status: Schema.optional(
2664
+ Schema.Union([
2665
+ Schema.Literals([
2666
+ "SUCCESS",
2667
+ "UNSUPPORTED_APPLICATION",
2668
+ "INSUFFICIENT_INVOCATIONS",
2669
+ ]),
2670
+ Schema.Null,
2671
+ ]),
2672
+ ),
2673
+ }).pipe(
2674
+ Schema.encodeKeys({
2675
+ mode: "mode",
2676
+ lastAnalyzedAt: "last_analyzed_at",
2677
+ status: "status",
2678
+ }),
2679
+ ),
2680
+ Schema.Struct({
2681
+ region: Schema.String,
2682
+ lastAnalyzedAt: Schema.optional(
2683
+ Schema.Union([Schema.String, Schema.Null]),
2684
+ ),
2685
+ status: Schema.optional(
2686
+ Schema.Union([
2687
+ Schema.Literals([
2688
+ "SUCCESS",
2689
+ "UNSUPPORTED_APPLICATION",
2690
+ "INSUFFICIENT_INVOCATIONS",
2691
+ ]),
2692
+ Schema.Null,
2693
+ ]),
2694
+ ),
2695
+ }).pipe(
2696
+ Schema.encodeKeys({
2697
+ region: "region",
2698
+ lastAnalyzedAt: "last_analyzed_at",
2699
+ status: "status",
2700
+ }),
2701
+ ),
2702
+ Schema.Struct({
2703
+ hostname: Schema.String,
2704
+ lastAnalyzedAt: Schema.optional(
2705
+ Schema.Union([Schema.String, Schema.Null]),
2706
+ ),
2707
+ status: Schema.optional(
2708
+ Schema.Union([
2709
+ Schema.Literals([
2710
+ "SUCCESS",
2711
+ "UNSUPPORTED_APPLICATION",
2712
+ "INSUFFICIENT_INVOCATIONS",
2713
+ ]),
2714
+ Schema.Null,
2715
+ ]),
2716
+ ),
2717
+ }).pipe(
2718
+ Schema.encodeKeys({
2719
+ hostname: "hostname",
2720
+ lastAnalyzedAt: "last_analyzed_at",
2721
+ status: "status",
2722
+ }),
2723
+ ),
2724
+ Schema.Struct({
2725
+ host: Schema.String,
2726
+ lastAnalyzedAt: Schema.optional(
2727
+ Schema.Union([Schema.String, Schema.Null]),
2728
+ ),
2729
+ status: Schema.optional(
2730
+ Schema.Union([
2731
+ Schema.Literals([
2732
+ "SUCCESS",
2733
+ "UNSUPPORTED_APPLICATION",
2734
+ "INSUFFICIENT_INVOCATIONS",
2735
+ ]),
2736
+ Schema.Null,
2737
+ ]),
2738
+ ),
2739
+ }).pipe(
2740
+ Schema.encodeKeys({
2741
+ host: "host",
2742
+ lastAnalyzedAt: "last_analyzed_at",
2743
+ status: "status",
2744
+ }),
2745
+ ),
2746
+ ]),
2747
+ Schema.Null,
2748
+ ]),
1985
2749
  ),
1986
- metadata: Schema.Unknown,
1987
- files: Schema.optional(
1988
- Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
2750
+ placementMode: Schema.optional(
2751
+ Schema.Union([Schema.Literal("smart"), Schema.Null]),
1989
2752
  ),
1990
- }).pipe(
1991
- T.Http({
1992
- method: "PUT",
1993
- path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/content",
1994
- contentType: "multipart",
1995
- }),
1996
- ) as unknown as Schema.Schema<PutDispatchNamespaceScriptContentRequest>;
1997
-
1998
- export type PutDispatchNamespaceScriptContentResponse = unknown;
1999
-
2000
- export const PutDispatchNamespaceScriptContentResponse =
2001
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutDispatchNamespaceScriptContentResponse>;
2753
+ placementStatus: Schema.optional(
2754
+ Schema.Union([
2755
+ Schema.Literals([
2756
+ "SUCCESS",
2757
+ "UNSUPPORTED_APPLICATION",
2758
+ "INSUFFICIENT_INVOCATIONS",
2759
+ ]),
2760
+ Schema.Null,
2761
+ ]),
2762
+ ),
2763
+ tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2764
+ tags: Schema.optional(
2765
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2766
+ ),
2767
+ tailConsumers: Schema.optional(
2768
+ Schema.Union([
2769
+ Schema.Array(
2770
+ Schema.Struct({
2771
+ service: Schema.String,
2772
+ environment: Schema.optional(
2773
+ Schema.Union([Schema.String, Schema.Null]),
2774
+ ),
2775
+ namespace: Schema.optional(
2776
+ Schema.Union([Schema.String, Schema.Null]),
2777
+ ),
2778
+ }),
2779
+ ),
2780
+ Schema.Null,
2781
+ ]),
2782
+ ),
2783
+ usageModel: Schema.optional(
2784
+ Schema.Union([
2785
+ Schema.Literals(["standard", "bundled", "unbound"]),
2786
+ Schema.Null,
2787
+ ]),
2788
+ ),
2789
+ })
2790
+ .pipe(
2791
+ Schema.encodeKeys({
2792
+ id: "id",
2793
+ compatibilityDate: "compatibility_date",
2794
+ compatibilityFlags: "compatibility_flags",
2795
+ createdOn: "created_on",
2796
+ etag: "etag",
2797
+ handlers: "handlers",
2798
+ hasAssets: "has_assets",
2799
+ hasModules: "has_modules",
2800
+ lastDeployedFrom: "last_deployed_from",
2801
+ logpush: "logpush",
2802
+ migrationTag: "migration_tag",
2803
+ modifiedOn: "modified_on",
2804
+ namedHandlers: "named_handlers",
2805
+ observability: "observability",
2806
+ placement: "placement",
2807
+ placementMode: "placement_mode",
2808
+ placementStatus: "placement_status",
2809
+ tag: "tag",
2810
+ tags: "tags",
2811
+ tailConsumers: "tail_consumers",
2812
+ usageModel: "usage_model",
2813
+ }),
2814
+ )
2815
+ .pipe(
2816
+ T.ResponsePath("result"),
2817
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptContentResponse>;
2002
2818
 
2003
2819
  export type PutDispatchNamespaceScriptContentError = DefaultErrors;
2004
2820
 
@@ -2506,7 +3322,13 @@ export interface GetDispatchNamespaceScriptSettingResponse {
2506
3322
  /** Tags associated with the Worker. */
2507
3323
  tags?: string[] | null;
2508
3324
  /** List of Workers that will consume logs from the attached Worker. */
2509
- tailConsumers?: unknown[] | null;
3325
+ tailConsumers?:
3326
+ | {
3327
+ service: string;
3328
+ environment?: string | null;
3329
+ namespace?: string | null;
3330
+ }[]
3331
+ | null;
2510
3332
  /** Usage model for the Worker invocations. */
2511
3333
  usageModel?: "standard" | "bundled" | "unbound" | null;
2512
3334
  }
@@ -2880,7 +3702,20 @@ export const GetDispatchNamespaceScriptSettingResponse =
2880
3702
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2881
3703
  ),
2882
3704
  tailConsumers: Schema.optional(
2883
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
3705
+ Schema.Union([
3706
+ Schema.Array(
3707
+ Schema.Struct({
3708
+ service: Schema.String,
3709
+ environment: Schema.optional(
3710
+ Schema.Union([Schema.String, Schema.Null]),
3711
+ ),
3712
+ namespace: Schema.optional(
3713
+ Schema.Union([Schema.String, Schema.Null]),
3714
+ ),
3715
+ }),
3716
+ ),
3717
+ Schema.Null,
3718
+ ]),
2884
3719
  ),
2885
3720
  usageModel: Schema.optional(
2886
3721
  Schema.Union([
@@ -3016,8 +3851,34 @@ export interface PatchDispatchNamespaceScriptSettingRequest {
3016
3851
  limits?: { cpuMs?: number };
3017
3852
  logpush?: boolean;
3018
3853
  migrations?:
3019
- | unknown
3020
- | { newTag?: string; oldTag?: string; steps?: unknown[] };
3854
+ | {
3855
+ deletedClasses?: string[];
3856
+ newClasses?: string[];
3857
+ newSqliteClasses?: string[];
3858
+ newTag?: string;
3859
+ oldTag?: string;
3860
+ renamedClasses?: { from?: string; to?: string }[];
3861
+ transferredClasses?: {
3862
+ from?: string;
3863
+ fromScript?: string;
3864
+ to?: string;
3865
+ }[];
3866
+ }
3867
+ | {
3868
+ newTag?: string;
3869
+ oldTag?: string;
3870
+ steps?: {
3871
+ deletedClasses?: string[];
3872
+ newClasses?: string[];
3873
+ newSqliteClasses?: string[];
3874
+ renamedClasses?: { from?: string; to?: string }[];
3875
+ transferredClasses?: {
3876
+ from?: string;
3877
+ fromScript?: string;
3878
+ to?: string;
3879
+ }[];
3880
+ }[];
3881
+ };
3021
3882
  observability?: {
3022
3883
  enabled: boolean;
3023
3884
  headSamplingRate?: number | null;
@@ -3035,7 +3896,9 @@ export interface PatchDispatchNamespaceScriptSettingRequest {
3035
3896
  | { hostname: string }
3036
3897
  | { host: string };
3037
3898
  tags?: string[] | null;
3038
- tailConsumers?: unknown[] | null;
3899
+ tailConsumers?:
3900
+ | { service: string; environment?: string; namespace?: string }[]
3901
+ | null;
3039
3902
  usageModel?: "standard" | "bundled" | "unbound";
3040
3903
  };
3041
3904
  }
@@ -3321,11 +4184,93 @@ export const PatchDispatchNamespaceScriptSettingRequest =
3321
4184
  logpush: Schema.optional(Schema.Boolean),
3322
4185
  migrations: Schema.optional(
3323
4186
  Schema.Union([
3324
- Schema.Unknown,
4187
+ Schema.Struct({
4188
+ deletedClasses: Schema.optional(Schema.Array(Schema.String)),
4189
+ newClasses: Schema.optional(Schema.Array(Schema.String)),
4190
+ newSqliteClasses: Schema.optional(Schema.Array(Schema.String)),
4191
+ newTag: Schema.optional(Schema.String),
4192
+ oldTag: Schema.optional(Schema.String),
4193
+ renamedClasses: Schema.optional(
4194
+ Schema.Array(
4195
+ Schema.Struct({
4196
+ from: Schema.optional(Schema.String),
4197
+ to: Schema.optional(Schema.String),
4198
+ }),
4199
+ ),
4200
+ ),
4201
+ transferredClasses: Schema.optional(
4202
+ Schema.Array(
4203
+ Schema.Struct({
4204
+ from: Schema.optional(Schema.String),
4205
+ fromScript: Schema.optional(Schema.String),
4206
+ to: Schema.optional(Schema.String),
4207
+ }).pipe(
4208
+ Schema.encodeKeys({
4209
+ from: "from",
4210
+ fromScript: "from_script",
4211
+ to: "to",
4212
+ }),
4213
+ ),
4214
+ ),
4215
+ ),
4216
+ }).pipe(
4217
+ Schema.encodeKeys({
4218
+ deletedClasses: "deleted_classes",
4219
+ newClasses: "new_classes",
4220
+ newSqliteClasses: "new_sqlite_classes",
4221
+ newTag: "new_tag",
4222
+ oldTag: "old_tag",
4223
+ renamedClasses: "renamed_classes",
4224
+ transferredClasses: "transferred_classes",
4225
+ }),
4226
+ ),
3325
4227
  Schema.Struct({
3326
4228
  newTag: Schema.optional(Schema.String),
3327
4229
  oldTag: Schema.optional(Schema.String),
3328
- steps: Schema.optional(Schema.Array(Schema.Unknown)),
4230
+ steps: Schema.optional(
4231
+ Schema.Array(
4232
+ Schema.Struct({
4233
+ deletedClasses: Schema.optional(
4234
+ Schema.Array(Schema.String),
4235
+ ),
4236
+ newClasses: Schema.optional(Schema.Array(Schema.String)),
4237
+ newSqliteClasses: Schema.optional(
4238
+ Schema.Array(Schema.String),
4239
+ ),
4240
+ renamedClasses: Schema.optional(
4241
+ Schema.Array(
4242
+ Schema.Struct({
4243
+ from: Schema.optional(Schema.String),
4244
+ to: Schema.optional(Schema.String),
4245
+ }),
4246
+ ),
4247
+ ),
4248
+ transferredClasses: Schema.optional(
4249
+ Schema.Array(
4250
+ Schema.Struct({
4251
+ from: Schema.optional(Schema.String),
4252
+ fromScript: Schema.optional(Schema.String),
4253
+ to: Schema.optional(Schema.String),
4254
+ }).pipe(
4255
+ Schema.encodeKeys({
4256
+ from: "from",
4257
+ fromScript: "from_script",
4258
+ to: "to",
4259
+ }),
4260
+ ),
4261
+ ),
4262
+ ),
4263
+ }).pipe(
4264
+ Schema.encodeKeys({
4265
+ deletedClasses: "deleted_classes",
4266
+ newClasses: "new_classes",
4267
+ newSqliteClasses: "new_sqlite_classes",
4268
+ renamedClasses: "renamed_classes",
4269
+ transferredClasses: "transferred_classes",
4270
+ }),
4271
+ ),
4272
+ ),
4273
+ ),
3329
4274
  }).pipe(
3330
4275
  Schema.encodeKeys({
3331
4276
  newTag: "new_tag",
@@ -3391,7 +4336,16 @@ export const PatchDispatchNamespaceScriptSettingRequest =
3391
4336
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3392
4337
  ),
3393
4338
  tailConsumers: Schema.optional(
3394
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
4339
+ Schema.Union([
4340
+ Schema.Array(
4341
+ Schema.Struct({
4342
+ service: Schema.String,
4343
+ environment: Schema.optional(Schema.String),
4344
+ namespace: Schema.optional(Schema.String),
4345
+ }),
4346
+ ),
4347
+ Schema.Null,
4348
+ ]),
3395
4349
  ),
3396
4350
  usageModel: Schema.optional(
3397
4351
  Schema.Literals(["standard", "bundled", "unbound"]),
@@ -3549,7 +4503,13 @@ export interface PatchDispatchNamespaceScriptSettingResponse {
3549
4503
  /** Tags associated with the Worker. */
3550
4504
  tags?: string[] | null;
3551
4505
  /** List of Workers that will consume logs from the attached Worker. */
3552
- tailConsumers?: unknown[] | null;
4506
+ tailConsumers?:
4507
+ | {
4508
+ service: string;
4509
+ environment?: string | null;
4510
+ namespace?: string | null;
4511
+ }[]
4512
+ | null;
3553
4513
  /** Usage model for the Worker invocations. */
3554
4514
  usageModel?: "standard" | "bundled" | "unbound" | null;
3555
4515
  }
@@ -3923,7 +4883,20 @@ export const PatchDispatchNamespaceScriptSettingResponse =
3923
4883
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3924
4884
  ),
3925
4885
  tailConsumers: Schema.optional(
3926
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
4886
+ Schema.Union([
4887
+ Schema.Array(
4888
+ Schema.Struct({
4889
+ service: Schema.String,
4890
+ environment: Schema.optional(
4891
+ Schema.Union([Schema.String, Schema.Null]),
4892
+ ),
4893
+ namespace: Schema.optional(
4894
+ Schema.Union([Schema.String, Schema.Null]),
4895
+ ),
4896
+ }),
4897
+ ),
4898
+ Schema.Null,
4899
+ ]),
3927
4900
  ),
3928
4901
  usageModel: Schema.optional(
3929
4902
  Schema.Union([