// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", bodyPart: "body_part", bucketName: "bucket_name", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", cpuMs: "cpu_ms", createdBy: "created_by", createdOn: "created_on", databaseId: "database_id", deletedClasses: "deleted_classes", destinationAddress: "destination_address", dispatchNamespace: "dispatch_namespace", entryPoint: "entry_point", fromScript: "from_script", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastDeployedFrom: "last_deployed_from", mainModule: "main_module", migrationTag: "migration_tag", mitigationTimeout: "mitigation_timeout", modifiedBy: "modified_by", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", namespaceName: "namespace_name", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", placementMode: "placement_mode", placementStatus: "placement_status", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", runWorkerFirst: "run_worker_first", scriptCount: "script_count", scriptName: "script_name", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", startupTimeMs: "startup_time_ms", storeId: "store_id", tailConsumers: "tail_consumers", transferredClasses: "transferred_classes", trustedWorkers: "trusted_workers", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workflowName: "workflow_name", }; export class D1DatabaseNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("D1DatabaseNotFound", { code: S.Number, message: S.String, }), [{ code: 10181 }], ) {} export class DispatchNamespaceAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "DispatchNamespaceAlreadyExists", { code: S.Number, message: S.String, }, ), [{ code: 100120 }], ) {} export class DispatchNamespaceNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "DispatchNamespaceNotFound", { code: S.Number, message: S.String, }, ), [{ code: 100119 }], ) {} export class DispatchNamespaceScriptNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "DispatchNamespaceScriptNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10007 }], ) {} export class DurableObjectClassNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "DurableObjectClassNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10061 }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class HyperdriveConfigNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "HyperdriveConfigNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10157 }], ) {} export class KVNamespaceNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("KVNamespaceNotFound", { code: S.Number, message: S.String, }), [{ code: 10041 }], ) {} export class MtlsCertificateNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "MtlsCertificateNotFound", { code: S.Number, message: S.String, }, ), [{ code: 100143 }], ) {} export class QueueNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("QueueNotFound", { code: S.Number, message: S.String, }), [{ code: 11000 }], ) {} export class R2BucketNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("R2BucketNotFound", { code: S.Number, message: S.String, }), [{ code: 10085 }], ) {} export class SecretsStoreBindingNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SecretsStoreBindingNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10182 }], ) {} export class ServiceBindingNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "ServiceBindingNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10144 }], ) {} export class VectorizeIndexNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "VectorizeIndexNotFound", { code: S.Number, message: S.String, }, ), [{ code: 10159 }], ) {} export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretTextType; } export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesList = Array< | DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesItem | (string & {}) >; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: | DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyFormat | (string & {}); /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown; } export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyType, usages: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKeyUsagesList, keyBase64: S.optional(S.String.pipe(T.Body("key_base64"))), keyJwk: S.optional(S.Unknown.pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsBulkUpdateRequestSecrets = | DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretText | DispatchNamespacesScriptsSecretsBulkUpdateRequestSecretsSecretKey; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestSecrets = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "text", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ]), ); export type DispatchNamespacesScriptsSecretsBulkUpdateRequestVersionTagsMap = { [key: string]: unknown | undefined; }; export const DispatchNamespacesScriptsSecretsBulkUpdateRequestVersionTagsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface BulkUpdateDispatchNamespaceScriptSecretsRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** Map of secret names to secret values: */ secrets?: DispatchNamespacesScriptsSecretsBulkUpdateRequestSecrets; /** Optional version tags to apply to the new script version. */ versionTags?: DispatchNamespacesScriptsSecretsBulkUpdateRequestVersionTagsMap; } export const BulkUpdateDispatchNamespaceScriptSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), secrets: S.optional( DispatchNamespacesScriptsSecretsBulkUpdateRequestSecrets, ), versionTags: S.optional( DispatchNamespacesScriptsSecretsBulkUpdateRequestVersionTagsMap.pipe( T.Body("version_tags"), ), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets-bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkUpdateDispatchNamespaceScriptSecretsRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsBulkUpdateResultSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSecretsBulkUpdateResultSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretTextType; } export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsBulkUpdateResultSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyType, usages: DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsBulkUpdateResult = | DispatchNamespacesScriptsSecretsBulkUpdateResultSecretText | DispatchNamespacesScriptsSecretsBulkUpdateResultSecretKey; export const DispatchNamespacesScriptsSecretsBulkUpdateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "text", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ]), ); export type BulkUpdateDispatchNamespaceScriptSecretsResponse = DispatchNamespacesScriptsSecretsBulkUpdateResult; export const BulkUpdateDispatchNamespaceScriptSecretsResponse = /*@__PURE__*/ S.suspend(() => DispatchNamespacesScriptsSecretsBulkUpdateResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "BulkUpdateDispatchNamespaceScriptSecretsResponse", }) as any as S.Schema; export interface CreateDispatchNamespaceRequest { /** Identifier. */ accountId: string; /** The name of the dispatch namespace. */ name?: string; } export const CreateDispatchNamespaceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/workers/dispatch/namespaces", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDispatchNamespaceRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateDispatchNamespaceResponse { /** Identifier. */ createdBy?: string | null; /** When the script was created. */ createdOn?: string | null; /** Identifier. */ modifiedBy?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** API Resource UUID tag. */ namespaceId?: string | null; /** Name of the Workers for Platforms dispatch namespace. */ namespaceName?: string | null; /** The current number of scripts in this Dispatch Namespace. */ scriptCount?: number | null; /** Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and `request.cf` is undefined. By default, Workers in a namespace are "untrusted". */ trustedWorkers?: boolean | null; } export const CreateDispatchNamespaceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdBy: S.optional(S.NullOr(S.String).pipe(T.Body("created_by"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), modifiedBy: S.optional(S.NullOr(S.String).pipe(T.Body("modified_by"))), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), namespaceName: S.optional( S.NullOr(S.String).pipe(T.Body("namespace_name")), ), scriptCount: S.optional(S.NullOr(S.Number).pipe(T.Body("script_count"))), trustedWorkers: S.optional( S.NullOr(S.Boolean).pipe(T.Body("trusted_workers")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDispatchNamespaceResponse", }) as any as S.Schema; export interface DispatchNamespacesScriptsAssetUploadCreateRequestManifestValue { /** The hash of the file. */ hash: string; /** The size of the file in bytes. */ size: number; } export const DispatchNamespacesScriptsAssetUploadCreateRequestManifestValue = /*@__PURE__*/ S.suspend(() => S.Struct({ hash: S.String, size: S.Number, }), ).annotate({ identifier: "DispatchNamespacesScriptsAssetUploadCreateRequestManifestValue", }) as any as S.Schema; export type DispatchNamespacesScriptsAssetUploadCreateRequestManifestMap = { [key: string]: | DispatchNamespacesScriptsAssetUploadCreateRequestManifestValue | undefined; }; export const DispatchNamespacesScriptsAssetUploadCreateRequestManifestMap = /*@__PURE__*/ S.Record( S.String, DispatchNamespacesScriptsAssetUploadCreateRequestManifestValue, ) as any as S.Schema; export interface CreateDispatchNamespaceScriptAssetUploadRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** A manifest ([path]: {hash, size}) map of files to upload. As an example, `/blog/hello-world.html` would be a valid path key. */ manifest: DispatchNamespacesScriptsAssetUploadCreateRequestManifestMap; } export const CreateDispatchNamespaceScriptAssetUploadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), manifest: DispatchNamespacesScriptsAssetUploadCreateRequestManifestMap, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/assets-upload-session", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDispatchNamespaceScriptAssetUploadRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsAssetUploadCreateResponseBucketsItemList = Array; export const DispatchNamespacesScriptsAssetUploadCreateResponseBucketsItemList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsAssetUploadCreateResponseBucketsList = Array; export const DispatchNamespacesScriptsAssetUploadCreateResponseBucketsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsAssetUploadCreateResponseBucketsItemList, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateDispatchNamespaceScriptAssetUploadResponse { /** The requests to make to upload assets. */ buckets?: DispatchNamespacesScriptsAssetUploadCreateResponseBucketsList | null; /** A JWT to use as authentication for uploading assets. */ jwt?: string | null; } export const CreateDispatchNamespaceScriptAssetUploadResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ buckets: S.optional( S.NullOr(DispatchNamespacesScriptsAssetUploadCreateResponseBucketsList), ), jwt: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDispatchNamespaceScriptAssetUploadResponse", }) as any as S.Schema; export interface DeleteDispatchNamespaceRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; } export const DeleteDispatchNamespaceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceRequest", }) as any as S.Schema; export type DeleteDispatchNamespaceResponse = unknown; export const DeleteDispatchNamespaceResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceResponse", }) as any as S.Schema; export interface DeleteDispatchNamespaceScriptRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** If set to true, delete will not be stopped by associated service binding, durable object, or other binding. Any of these associated bindings/durable objects will be deleted along with the script. */ force?: boolean; } export const DeleteDispatchNamespaceScriptRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), force: S.optional(S.Boolean.pipe(T.Query())), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptRequest", }) as any as S.Schema; export type DeleteDispatchNamespaceScriptResponse = unknown; export const DeleteDispatchNamespaceScriptResponse = /*@__PURE__*/ S.suspend( () => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptResponse", }) as any as S.Schema; export interface DeleteDispatchNamespaceScriptSecretRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** A JavaScript variable name for the secret binding. */ secretName: string; /** Flag that indicates whether the secret name is URL encoded. */ urlEncoded?: boolean; } export const DeleteDispatchNamespaceScriptSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), secretName: S.String.pipe(T.Label("secret_name")), urlEncoded: S.optional(S.Boolean.pipe(T.Query("url_encoded"))), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptSecretRequest", }) as any as S.Schema; export type DeleteDispatchNamespaceScriptSecretResponse = unknown; export const DeleteDispatchNamespaceScriptSecretResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptSecretResponse", }) as any as S.Schema; export interface DeleteDispatchNamespaceScriptTagRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; tag: string; } export const DeleteDispatchNamespaceScriptTagRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), tag: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags/{tag}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptTagRequest", }) as any as S.Schema; export type DeleteDispatchNamespaceScriptTagResponse = unknown; export const DeleteDispatchNamespaceScriptTagResponse = /*@__PURE__*/ S.suspend( () => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDispatchNamespaceScriptTagResponse", }) as any as S.Schema; export interface GetDispatchNamespaceRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; } export const GetDispatchNamespaceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDispatchNamespaceResponse { /** Identifier. */ createdBy?: string | null; /** When the script was created. */ createdOn?: string | null; /** Identifier. */ modifiedBy?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** API Resource UUID tag. */ namespaceId?: string | null; /** Name of the Workers for Platforms dispatch namespace. */ namespaceName?: string | null; /** The current number of scripts in this Dispatch Namespace. */ scriptCount?: number | null; /** Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and `request.cf` is undefined. By default, Workers in a namespace are "untrusted". */ trustedWorkers?: boolean | null; } export const GetDispatchNamespaceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdBy: S.optional(S.NullOr(S.String).pipe(T.Body("created_by"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), modifiedBy: S.optional(S.NullOr(S.String).pipe(T.Body("modified_by"))), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), namespaceName: S.optional( S.NullOr(S.String).pipe(T.Body("namespace_name")), ), scriptCount: S.optional(S.NullOr(S.Number).pipe(T.Body("script_count"))), trustedWorkers: S.optional( S.NullOr(S.Boolean).pipe(T.Body("trusted_workers")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceResponse", }) as any as S.Schema; export interface GetDispatchNamespaceScriptRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const GetDispatchNamespaceScriptRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptRequest", }) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptCacheOptions { /** Whether caching is enabled for this Worker. */ enabled: boolean; /** Whether cached responses are shared across Worker version */ crossVersionCache?: boolean | null; } export const DispatchNamespacesScriptsGetResponseScriptCacheOptions = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, crossVersionCache: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cross_version_cache")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptCacheOptions", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptCompatibilityFlagsList = Array; export const DispatchNamespacesScriptsGetResponseScriptCompatibilityFlagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptHandlersList = Array; export const DispatchNamespacesScriptsGetResponseScriptHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptNamedHandlersItemHandlersList = Array; export const DispatchNamespacesScriptsGetResponseScriptNamedHandlersItemHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptNamedHandlersItem { /** The names of handlers exported as part of the named export. */ handlers?: DispatchNamespacesScriptsGetResponseScriptNamedHandlersItemHandlersList | null; /** The name of the export. */ name?: string | null; } export const DispatchNamespacesScriptsGetResponseScriptNamedHandlersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ handlers: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptNamedHandlersItemHandlersList, ), ), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptNamedHandlersItem", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptNamedHandlersList = Array; export const DispatchNamespacesScriptsGetResponseScriptNamedHandlersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptNamedHandlersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptObservabilityLogsDestinationsList = Array; export const DispatchNamespacesScriptsGetResponseScriptObservabilityLogsDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptObservabilityLogs { /** Whether logs are enabled for the Worker. */ enabled: boolean; /** Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. */ invocationLogs: boolean; /** A list of destinations where logs will be exported to. */ destinations?: DispatchNamespacesScriptsGetResponseScriptObservabilityLogsDestinationsList | null; /** The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether log persistence is enabled for the Worker. */ persist?: boolean | null; } export const DispatchNamespacesScriptsGetResponseScriptObservabilityLogs = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, invocationLogs: S.Boolean.pipe(T.Body("invocation_logs")), destinations: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptObservabilityLogsDestinationsList, ), ), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptObservabilityLogs", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptObservabilityTracesDestinationsList = Array; export const DispatchNamespacesScriptsGetResponseScriptObservabilityTracesDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptObservabilityTracesPropagationPolicy = | "authenticated" | "accept"; export const DispatchNamespacesScriptsGetResponseScriptObservabilityTracesPropagationPolicy = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptObservabilityTraces { /** A list of destinations where traces will be exported to. */ destinations?: DispatchNamespacesScriptsGetResponseScriptObservabilityTracesDestinationsList | null; /** Whether traces are enabled for the Worker. */ enabled?: boolean | null; /** The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether trace persistence is enabled for the Worker. */ persist?: boolean | null; /** Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" (default) honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. */ propagationPolicy?: DispatchNamespacesScriptsGetResponseScriptObservabilityTracesPropagationPolicy | null; } export const DispatchNamespacesScriptsGetResponseScriptObservabilityTraces = /*@__PURE__*/ S.suspend(() => S.Struct({ destinations: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptObservabilityTracesDestinationsList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), propagationPolicy: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptObservabilityTracesPropagationPolicy, ).pipe(T.Body("propagation_policy")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptObservabilityTraces", }) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptObservability { /** Whether observability is enabled for the Worker. */ enabled: boolean; /** The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Log settings for the Worker. */ logs?: DispatchNamespacesScriptsGetResponseScriptObservabilityLogs | null; /** Trace settings for the Worker. */ traces?: DispatchNamespacesScriptsGetResponseScriptObservabilityTraces | null; } export const DispatchNamespacesScriptsGetResponseScriptObservability = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), logs: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptObservabilityLogs), ), traces: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptObservabilityTraces), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptObservability", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase0Mode = "smart"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase0Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase0Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase0Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase0 { /** Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase0Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase0Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase0 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase0Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase0Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase0", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase1Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase1Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase1 { /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase1Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({ region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase1Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase1", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase2Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase2Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase2 { /** HTTP hostname for targeted placement. */ hostname: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase2Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase2 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase2Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase2", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase3Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase3Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase3 { /** TCP host and port for targeted placement. */ host: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase3Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase3 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase3Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase3", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase4Mode = "targeted"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase4Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase4Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase4Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase4 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase4Mode; /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase4Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase4Mode, region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase4Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase4", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase5Mode = "targeted"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase5Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase5Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase5Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase5 { /** HTTP hostname for targeted placement. */ hostname: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase5Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase5Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase5Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase5Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase5", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase6Mode = "targeted"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase6Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase6Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase6Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase6 { /** TCP host and port for targeted placement. */ host: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase6Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase6Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase6 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase6Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase6Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase6", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase7Mode = "targeted"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion { /** Cloud region in format 'provider:region'. */ region: string; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion = /*@__PURE__*/ S.suspend(() => S.Struct({ region: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion", }) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname { /** HTTP hostname for targeted placement. */ hostname: string; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname", }) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost { /** TCP host:port for targeted placement. */ host: string; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItem = | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["region"], ["hostname"], ["host"]]), ); export type DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetList = Array; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItem, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacementCase7Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScriptPlacementCase7 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase7Mode; /** Array of placement targets (currently limited to single target). */ target: DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetList; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsGetResponseScriptPlacementCase7Status | null; } export const DispatchNamespacesScriptsGetResponseScriptPlacementCase7 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsGetResponseScriptPlacementCase7Mode, target: DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetList, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementCase7Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptPlacementCase7", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptPlacement = | DispatchNamespacesScriptsGetResponseScriptPlacementCase0 | DispatchNamespacesScriptsGetResponseScriptPlacementCase1 | DispatchNamespacesScriptsGetResponseScriptPlacementCase2 | DispatchNamespacesScriptsGetResponseScriptPlacementCase3 | DispatchNamespacesScriptsGetResponseScriptPlacementCase4 | DispatchNamespacesScriptsGetResponseScriptPlacementCase5 | DispatchNamespacesScriptsGetResponseScriptPlacementCase6 | DispatchNamespacesScriptsGetResponseScriptPlacementCase7; export const DispatchNamespacesScriptsGetResponseScriptPlacement = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["mode", "lastAnalyzedAt", "status"], ["region", "lastAnalyzedAt", "status"], ["hostname", "lastAnalyzedAt", "status"], ["host", "lastAnalyzedAt", "status"], ["mode", "region", "lastAnalyzedAt", "status"], ["hostname", "mode", "lastAnalyzedAt", "status"], ["host", "mode", "lastAnalyzedAt", "status"], ["mode", "target", "lastAnalyzedAt", "status"], ]), ); export type DispatchNamespacesScriptsGetResponseScriptPlacementMode = | "smart" | "targeted"; export const DispatchNamespacesScriptsGetResponseScriptPlacementMode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptPlacementStatus = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsGetResponseScriptPlacementStatus = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsGetResponseScriptTagsList = Array; export const DispatchNamespacesScriptsGetResponseScriptTagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsGetResponseScriptTailConsumersItem { /** Name of Worker that is to be the consumer. */ service: string; /** Optional environment if the Worker utilizes one. */ environment?: string | null; /** Optional dispatch namespace the script belongs to. */ namespace?: string | null; } export const DispatchNamespacesScriptsGetResponseScriptTailConsumersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ service: S.String, environment: S.optional(S.NullOr(S.String)), namespace: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScriptTailConsumersItem", }) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptTailConsumersList = Array; export const DispatchNamespacesScriptsGetResponseScriptTailConsumersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptTailConsumersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsGetResponseScriptUsageModel = | "standard" | "bundled" | "unbound"; export const DispatchNamespacesScriptsGetResponseScriptUsageModel = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsGetResponseScript { /** The name used to identify the script. */ id?: string | null; /** Global CacheW configuration for the Worker. When caching is on, */ cacheOptions?: DispatchNamespacesScriptsGetResponseScriptCacheOptions | null; /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: string | null; /** 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`. */ compatibilityFlags?: DispatchNamespacesScriptsGetResponseScriptCompatibilityFlagsList | null; /** When the script was created. */ createdOn?: string | null; /** Hashed script content, can be used in a If-None-Match header when updating. */ etag?: string | null; /** The names of handlers exported as part of the default export. */ handlers?: DispatchNamespacesScriptsGetResponseScriptHandlersList | null; /** Whether a Worker contains assets. */ hasAssets?: boolean | null; /** Whether a Worker contains modules. */ hasModules?: boolean | null; /** The client most recently used to deploy this Worker. */ lastDeployedFrom?: string | null; /** Whether Logpush is turned on for the Worker. */ logpush?: boolean | null; /** The tag of the Durable Object migration that was most recently applied for this Worker. */ migrationTag?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** Named exports, such as Durable Object class implementations and named entrypoints. */ namedHandlers?: DispatchNamespacesScriptsGetResponseScriptNamedHandlersList | null; /** Observability settings for the Worker. */ observability?: DispatchNamespacesScriptsGetResponseScriptObservability | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: DispatchNamespacesScriptsGetResponseScriptPlacement | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placementMode?: DispatchNamespacesScriptsGetResponseScriptPlacementMode | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ placementStatus?: DispatchNamespacesScriptsGetResponseScriptPlacementStatus | null; /** The immutable ID of the script. */ tag?: string | null; /** Tags associated with the Worker. */ tags?: DispatchNamespacesScriptsGetResponseScriptTagsList | null; /** List of Workers that will consume logs from the attached Worker. */ tailConsumers?: DispatchNamespacesScriptsGetResponseScriptTailConsumersList | null; /** Usage model for the Worker invocations. */ usageModel?: DispatchNamespacesScriptsGetResponseScriptUsageModel | null; } export const DispatchNamespacesScriptsGetResponseScript = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cacheOptions: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptCacheOptions).pipe( T.Body("cache_options"), ), ), compatibilityDate: S.optional( S.NullOr(S.String).pipe(T.Body("compatibility_date")), ), compatibilityFlags: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptCompatibilityFlagsList, ).pipe(T.Body("compatibility_flags")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), etag: S.optional(S.NullOr(S.String)), handlers: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptHandlersList), ), hasAssets: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_assets"))), hasModules: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_modules"))), lastDeployedFrom: S.optional( S.NullOr(S.String).pipe(T.Body("last_deployed_from")), ), logpush: S.optional(S.NullOr(S.Boolean)), migrationTag: S.optional( S.NullOr(S.String).pipe(T.Body("migration_tag")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namedHandlers: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptNamedHandlersList, ).pipe(T.Body("named_handlers")), ), observability: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptObservability), ), placement: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptPlacement), ), placementMode: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptPlacementMode).pipe( T.Body("placement_mode"), ), ), placementStatus: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptPlacementStatus, ).pipe(T.Body("placement_status")), ), tag: S.optional(S.NullOr(S.String)), tags: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptTagsList), ), tailConsumers: S.optional( S.NullOr( DispatchNamespacesScriptsGetResponseScriptTailConsumersList, ).pipe(T.Body("tail_consumers")), ), usageModel: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptUsageModel).pipe( T.Body("usage_model"), ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsGetResponseScript", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDispatchNamespaceScriptResponse { /** When the script was created. */ createdOn?: string | null; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; script?: DispatchNamespacesScriptsGetResponseScript | null; } export const GetDispatchNamespaceScriptResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), dispatchNamespace: S.optional( S.NullOr(S.String).pipe(T.Body("dispatch_namespace")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), script: S.optional(S.NullOr(DispatchNamespacesScriptsGetResponseScript)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptResponse", }) as any as S.Schema; export interface GetDispatchNamespaceScriptBindingRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const GetDispatchNamespaceScriptBindingRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptBindingRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemAIType = "ai"; export const DispatchNamespacesScriptsBindingsGetResultItemAIType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemAI { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemAIType; } export const DispatchNamespacesScriptsBindingsGetResultItemAI = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemAIType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemAI", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemAISearchType = "ai_search"; export const DispatchNamespacesScriptsBindingsGetResultItemAISearchType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemAISearch { /** The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance. */ instanceName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemAISearchType; /** The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field. */ namespace?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemAISearch = /*@__PURE__*/ S.suspend(() => S.Struct({ instanceName: S.String.pipe(T.Body("instance_name")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemAISearchType, namespace: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemAISearch", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespaceType = "ai_search_namespace"; export const DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespaceType; } export const DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngineType = "analytics_engine"; export const DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngineType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngine { /** The name of the dataset to bind to. */ dataset: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngineType; } export const DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngine = /*@__PURE__*/ S.suspend(() => S.Struct({ dataset: S.String, name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngineType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngine", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemAssetsType = "assets"; export const DispatchNamespacesScriptsBindingsGetResultItemAssetsType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemAssets { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemAssetsType; } export const DispatchNamespacesScriptsBindingsGetResultItemAssets = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemAssetsType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemAssets", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemBrowserType = "browser"; export const DispatchNamespacesScriptsBindingsGetResultItemBrowserType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemBrowser { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemBrowserType; } export const DispatchNamespacesScriptsBindingsGetResultItemBrowser = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemBrowserType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemBrowser", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemD1Type = "d1"; export const DispatchNamespacesScriptsBindingsGetResultItemD1Type = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemD1 { /** Identifier of the D1 database to bind to. */ databaseId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemD1Type; /** Identifier of the D1 database to bind to. */ id?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemD1 = /*@__PURE__*/ S.suspend(() => S.Struct({ databaseId: S.String.pipe(T.Body("database_id")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemD1Type, id: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemD1", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemDataBlobType = "data_blob"; export const DispatchNamespacesScriptsBindingsGetResultItemDataBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemDataBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the data content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemDataBlobType; } export const DispatchNamespacesScriptsBindingsGetResultItemDataBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemDataBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDataBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceType = "dispatch_namespace"; export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem { /** Name of the parameter. */ name: string; } export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsList = Array; export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker { /** Entrypoint to invoke on the outbound worker. */ entrypoint?: string | null; /** Environment of the outbound worker. */ environment?: string | null; /** Name of the outbound worker. */ service?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker = /*@__PURE__*/ S.suspend(() => S.Struct({ entrypoint: S.optional(S.NullOr(S.String)), environment: S.optional(S.NullOr(S.String)), service: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker", }) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutbound { /** Pass information from the Dispatch Worker to the Outbound Worker through the parameters. */ params?: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsList | null; /** Outbound worker. */ worker?: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker | null; } export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutbound = /*@__PURE__*/ S.suspend(() => S.Struct({ params: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsList, ), ), worker: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutbound", }) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The name of the dispatch namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceType; /** Outbound worker. */ outbound?: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutbound | null; } export const DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceType, outbound: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutbound, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespaceType = "durable_object_namespace"; export const DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespaceType; /** The exported class name of the Durable Object. */ className?: string | null; /** The dispatch namespace the Durable Object script belongs to. */ dispatchNamespace?: string | null; /** The environment of the script_name to bind to. */ environment?: string | null; /** Namespace identifier tag. */ namespaceId?: string | null; /** The script where the Durable Object is defined, if it is external to this Worker. */ scriptName?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespaceType, className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), dispatchNamespace: S.optional( S.NullOr(S.String).pipe(T.Body("dispatch_namespace")), ), environment: S.optional(S.NullOr(S.String)), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemHyperdriveType = "hyperdrive"; export const DispatchNamespacesScriptsBindingsGetResultItemHyperdriveType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemHyperdrive { /** Identifier of the Hyperdrive connection to bind to. */ id: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemHyperdriveType; } export const DispatchNamespacesScriptsBindingsGetResultItemHyperdrive = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemHyperdriveType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemHyperdrive", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemInheritType = "inherit"; export const DispatchNamespacesScriptsBindingsGetResultItemInheritType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemInherit { /** The name of the inherited binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemInheritType; /** The old name of the inherited binding. If set, the binding will be renamed from `old_name` to `name` in the new version. If not set, the binding will keep the same name between versions. */ oldName?: string | null; /** Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version. */ versionId?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemInherit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemInheritType, oldName: S.optional(S.NullOr(S.String).pipe(T.Body("old_name"))), versionId: S.optional(S.NullOr(S.String).pipe(T.Body("version_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemInherit", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemImagesType = "images"; export const DispatchNamespacesScriptsBindingsGetResultItemImagesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemImages { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemImagesType; } export const DispatchNamespacesScriptsBindingsGetResultItemImages = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemImagesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemImages", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemJsonType = "json"; export const DispatchNamespacesScriptsBindingsGetResultItemJsonType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemJson { /** JSON data to use. */ json: unknown; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemJsonType; } export const DispatchNamespacesScriptsBindingsGetResultItemJson = /*@__PURE__*/ S.suspend(() => S.Struct({ json: S.Unknown, name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemJsonType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemJson", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemKVNamespaceType = "kv_namespace"; export const DispatchNamespacesScriptsBindingsGetResultItemKVNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemKVNamespace { /** A JavaScript variable name for the binding. */ name: string; /** Namespace identifier tag. */ namespaceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemKVNamespaceType; } export const DispatchNamespacesScriptsBindingsGetResultItemKVNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), type: DispatchNamespacesScriptsBindingsGetResultItemKVNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemKVNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemMediaType = "media"; export const DispatchNamespacesScriptsBindingsGetResultItemMediaType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemMedia { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemMediaType; } export const DispatchNamespacesScriptsBindingsGetResultItemMedia = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemMediaType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemMedia", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificateType = "mtls_certificate"; export const DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificateType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificate { /** Identifier of the certificate to bind to. */ certificateId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificateType; } export const DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificate = /*@__PURE__*/ S.suspend(() => S.Struct({ certificateId: S.String.pipe(T.Body("certificate_id")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificateType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificate", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemPlainTextType = "plain_text"; export const DispatchNamespacesScriptsBindingsGetResultItemPlainTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemPlainText { /** A JavaScript variable name for the binding. */ name: string; /** The text value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemPlainTextType; } export const DispatchNamespacesScriptsBindingsGetResultItemPlainText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemPlainTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemPlainText", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemPipelinesType = "pipelines"; export const DispatchNamespacesScriptsBindingsGetResultItemPipelinesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemPipelines { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Pipeline to bind to. */ pipeline: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemPipelinesType; } export const DispatchNamespacesScriptsBindingsGetResultItemPipelines = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, pipeline: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemPipelinesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemPipelines", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemQueueType = "queue"; export const DispatchNamespacesScriptsBindingsGetResultItemQueueType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemQueue { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Queue to bind to. */ queueName: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemQueueType; } export const DispatchNamespacesScriptsBindingsGetResultItemQueue = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, queueName: S.String.pipe(T.Body("queue_name")), type: DispatchNamespacesScriptsBindingsGetResultItemQueueType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemQueue", }) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple { /** The limit (requests per period). */ limit: number; /** The period in seconds. */ period: number; /** Duration in seconds to apply the mitigation action after the rate limit is exceeded. Valid values are 0 (disabled), 10, or multiples of 60 up to 86400. Must be greater than or equal to the period when non-zero. */ mitigationTimeout?: number | null; } export const DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple = /*@__PURE__*/ S.suspend(() => S.Struct({ limit: S.Number, period: S.Number, mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemRatelimitType = "ratelimit"; export const DispatchNamespacesScriptsBindingsGetResultItemRatelimitType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemRatelimit { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the rate limit namespace to bind to. */ namespaceId: string; /** The rate limit configuration. */ simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemRatelimitType; } export const DispatchNamespacesScriptsBindingsGetResultItemRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple, type: DispatchNamespacesScriptsBindingsGetResultItemRatelimitType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemRatelimit", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemR2BucketType = "r2_bucket"; export const DispatchNamespacesScriptsBindingsGetResultItemR2BucketType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsBindingsGetResultItemR2BucketJurisdiction = | "eu" | "fedramp" | "fedramp-high"; export const DispatchNamespacesScriptsBindingsGetResultItemR2BucketJurisdiction = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemR2Bucket { /** R2 bucket to bind to. */ bucketName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemR2BucketType; /** The [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions) of the R2 bucket. */ jurisdiction?: DispatchNamespacesScriptsBindingsGetResultItemR2BucketJurisdiction | null; } export const DispatchNamespacesScriptsBindingsGetResultItemR2Bucket = /*@__PURE__*/ S.suspend(() => S.Struct({ bucketName: S.String.pipe(T.Body("bucket_name")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemR2BucketType, jurisdiction: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemR2BucketJurisdiction, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemR2Bucket", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemSecretTextType = "secret_text"; export const DispatchNamespacesScriptsBindingsGetResultItemSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemSecretTextType; } export const DispatchNamespacesScriptsBindingsGetResultItemSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemSendEmailType = "send_email"; export const DispatchNamespacesScriptsBindingsGetResultItemSendEmailType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedDestinationAddressesList = Array; export const DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedDestinationAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedSenderAddressesList = Array; export const DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedSenderAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemSendEmail { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemSendEmailType; /** List of allowed destination addresses. */ allowedDestinationAddresses?: DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedDestinationAddressesList | null; /** List of allowed sender addresses. */ allowedSenderAddresses?: DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedSenderAddressesList | null; /** Destination address for the email. */ destinationAddress?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemSendEmail = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemSendEmailType, allowedDestinationAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedDestinationAddressesList, ).pipe(T.Body("allowed_destination_addresses")), ), allowedSenderAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemSendEmailAllowedSenderAddressesList, ).pipe(T.Body("allowed_sender_addresses")), ), destinationAddress: S.optional( S.NullOr(S.String).pipe(T.Body("destination_address")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemSendEmail", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemServiceType = "service"; export const DispatchNamespacesScriptsBindingsGetResultItemServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemService { /** A JavaScript variable name for the binding. */ name: string; /** Name of Worker to bind to. */ service: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemServiceType; /** Entrypoint to invoke on the target Worker. */ entrypoint?: string | null; /** Optional environment if the Worker utilizes one. */ environment?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, service: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemServiceType, entrypoint: S.optional(S.NullOr(S.String)), environment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemService", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemTextBlobType = "text_blob"; export const DispatchNamespacesScriptsBindingsGetResultItemTextBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemTextBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the text content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemTextBlobType; } export const DispatchNamespacesScriptsBindingsGetResultItemTextBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemTextBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemTextBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemVectorizeType = "vectorize"; export const DispatchNamespacesScriptsBindingsGetResultItemVectorizeType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemVectorize { /** Name of the Vectorize index to bind to. */ indexName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemVectorizeType; } export const DispatchNamespacesScriptsBindingsGetResultItemVectorize = /*@__PURE__*/ S.suspend(() => S.Struct({ indexName: S.String.pipe(T.Body("index_name")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemVectorizeType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemVectorize", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemVersionMetadataType = "version_metadata"; export const DispatchNamespacesScriptsBindingsGetResultItemVersionMetadataType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemVersionMetadata { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemVersionMetadataType; } export const DispatchNamespacesScriptsBindingsGetResultItemVersionMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemVersionMetadataType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemVersionMetadata", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecretType = "secrets_store_secret"; export const DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecretType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecret { /** A JavaScript variable name for the binding. */ name: string; /** Name of the secret in the store. */ secretName: string; /** ID of the store containing the secret. */ storeId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecretType; } export const DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecret = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, secretName: S.String.pipe(T.Body("secret_name")), storeId: S.String.pipe(T.Body("store_id")), type: DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecretType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecret", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemFlagshipType = "flagship"; export const DispatchNamespacesScriptsBindingsGetResultItemFlagshipType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemFlagship { /** ID of the Flagship app to bind to for feature flag evaluation. */ appId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemFlagshipType; } export const DispatchNamespacesScriptsBindingsGetResultItemFlagship = /*@__PURE__*/ S.suspend(() => S.Struct({ appId: S.String.pipe(T.Body("app_id")), name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemFlagshipType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemFlagship", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsBindingsGetResultItemSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsBindingsGetResultItemSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsBindingsGetResultItemSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsBindingsGetResultItemSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsBindingsGetResultItemSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyType, usages: DispatchNamespacesScriptsBindingsGetResultItemSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemWorkflowType = "workflow"; export const DispatchNamespacesScriptsBindingsGetResultItemWorkflowType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemWorkflow { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemWorkflowType; /** Name of the Workflow to bind to. */ workflowName: string; /** Class name of the Workflow. Should only be provided if the Workflow belongs to this script. */ className?: string | null; /** Script name that contains the Workflow. If not provided, defaults to this script name. */ scriptName?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemWorkflow = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemWorkflowType, workflowName: S.String.pipe(T.Body("workflow_name")), className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemWorkflow", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemWasmModuleType = "wasm_module"; export const DispatchNamespacesScriptsBindingsGetResultItemWasmModuleType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemWasmModule { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the WebAssembly module content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemWasmModuleType; } export const DispatchNamespacesScriptsBindingsGetResultItemWasmModule = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemWasmModuleType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemWasmModule", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemVPCServiceType = "vpc_service"; export const DispatchNamespacesScriptsBindingsGetResultItemVPCServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemVPCService { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the VPC service to bind to. */ serviceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemVPCServiceType; } export const DispatchNamespacesScriptsBindingsGetResultItemVPCService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, serviceId: S.String.pipe(T.Body("service_id")), type: DispatchNamespacesScriptsBindingsGetResultItemVPCServiceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemVPCService", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItemVPCNetworkType = "vpc_network"; export const DispatchNamespacesScriptsBindingsGetResultItemVPCNetworkType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsBindingsGetResultItemVPCNetwork { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsBindingsGetResultItemVPCNetworkType; /** Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id. */ networkId?: string | null; /** UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id. */ tunnelId?: string | null; } export const DispatchNamespacesScriptsBindingsGetResultItemVPCNetwork = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsBindingsGetResultItemVPCNetworkType, networkId: S.optional(S.NullOr(S.String).pipe(T.Body("network_id"))), tunnelId: S.optional(S.NullOr(S.String).pipe(T.Body("tunnel_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsBindingsGetResultItemVPCNetwork", }) as any as S.Schema; export type DispatchNamespacesScriptsBindingsGetResultItem = | DispatchNamespacesScriptsBindingsGetResultItemAI | DispatchNamespacesScriptsBindingsGetResultItemAISearch | DispatchNamespacesScriptsBindingsGetResultItemAISearchNamespace | DispatchNamespacesScriptsBindingsGetResultItemAnalyticsEngine | DispatchNamespacesScriptsBindingsGetResultItemAssets | DispatchNamespacesScriptsBindingsGetResultItemBrowser | DispatchNamespacesScriptsBindingsGetResultItemD1 | DispatchNamespacesScriptsBindingsGetResultItemDataBlob | DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespace | DispatchNamespacesScriptsBindingsGetResultItemDurableObjectNamespace | DispatchNamespacesScriptsBindingsGetResultItemHyperdrive | DispatchNamespacesScriptsBindingsGetResultItemInherit | DispatchNamespacesScriptsBindingsGetResultItemImages | DispatchNamespacesScriptsBindingsGetResultItemJson | DispatchNamespacesScriptsBindingsGetResultItemKVNamespace | DispatchNamespacesScriptsBindingsGetResultItemMedia | DispatchNamespacesScriptsBindingsGetResultItemMTLSCertificate | DispatchNamespacesScriptsBindingsGetResultItemPlainText | DispatchNamespacesScriptsBindingsGetResultItemPipelines | DispatchNamespacesScriptsBindingsGetResultItemQueue | DispatchNamespacesScriptsBindingsGetResultItemRatelimit | DispatchNamespacesScriptsBindingsGetResultItemR2Bucket | DispatchNamespacesScriptsBindingsGetResultItemSecretText | DispatchNamespacesScriptsBindingsGetResultItemSendEmail | DispatchNamespacesScriptsBindingsGetResultItemService | DispatchNamespacesScriptsBindingsGetResultItemTextBlob | DispatchNamespacesScriptsBindingsGetResultItemVectorize | DispatchNamespacesScriptsBindingsGetResultItemVersionMetadata | DispatchNamespacesScriptsBindingsGetResultItemSecretsStoreSecret | DispatchNamespacesScriptsBindingsGetResultItemFlagship | DispatchNamespacesScriptsBindingsGetResultItemSecretKey | DispatchNamespacesScriptsBindingsGetResultItemWorkflow | DispatchNamespacesScriptsBindingsGetResultItemWasmModule | DispatchNamespacesScriptsBindingsGetResultItemVPCService | DispatchNamespacesScriptsBindingsGetResultItemVPCNetwork; export const DispatchNamespacesScriptsBindingsGetResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["instanceName", "name", "type", "namespace"], ["name", "namespace", "type"], ["dataset", "name", "type"], ["name", "type"], ["name", "type"], ["databaseId", "name", "type", "id"], ["name", "part", "type"], ["name", "namespace", "type", "outbound"], [ "name", "type", "className", "dispatchNamespace", "environment", "namespaceId", "scriptName", ], ["id", "name", "type"], ["name", "type", "oldName", "versionId"], ["name", "type"], ["json", "name", "type"], ["name", "namespaceId", "type"], ["name", "type"], ["certificateId", "name", "type"], ["name", "text", "type"], ["name", "pipeline", "type"], ["name", "queueName", "type"], ["name", "namespaceId", "simple", "type"], ["bucketName", "name", "type", "jurisdiction"], ["name", "text", "type"], [ "name", "type", "allowedDestinationAddresses", "allowedSenderAddresses", "destinationAddress", ], ["name", "service", "type", "entrypoint", "environment"], ["name", "part", "type"], ["indexName", "name", "type"], ["name", "type"], ["name", "secretName", "storeId", "type"], ["appId", "name", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ["name", "type", "workflowName", "className", "scriptName"], ["name", "part", "type"], ["name", "serviceId", "type"], ["name", "type", "networkId", "tunnelId"], ]), ); export type DispatchNamespacesScriptsBindingsGetResultList = Array; export const DispatchNamespacesScriptsBindingsGetResultList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsBindingsGetResultItem, ) as any as S.Schema; export interface GetDispatchNamespaceScriptBindingResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DispatchNamespacesScriptsBindingsGetResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const GetDispatchNamespaceScriptBindingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: DispatchNamespacesScriptsBindingsGetResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptBindingResponse", }) as any as S.Schema; export interface GetDispatchNamespaceScriptContentRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const GetDispatchNamespaceScriptContentRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptContentRequest", }) as any as S.Schema; export interface GetDispatchNamespaceScriptContentResponse {} export const GetDispatchNamespaceScriptContentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptContentResponse", }) as any as S.Schema; export interface GetDispatchNamespaceScriptSecretRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** A JavaScript variable name for the secret binding. */ secretName: string; /** Flag that indicates whether the secret name is URL encoded. */ urlEncoded?: boolean; } export const GetDispatchNamespaceScriptSecretRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), secretName: S.String.pipe(T.Label("secret_name")), urlEncoded: S.optional(S.Boolean.pipe(T.Query("url_encoded"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptSecretRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsGetResultSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSecretsGetResultSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSecretsGetResultSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsGetResultSecretTextType; } export const DispatchNamespacesScriptsSecretsGetResultSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSecretsGetResultSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsGetResultSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsGetResultSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsGetResultSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsGetResultSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSecretsGetResultSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSecretsGetResultSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSecretsGetResultSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsGetResultSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSecretsGetResultSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSecretsGetResultSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSecretsGetResultSecretKeyType, usages: DispatchNamespacesScriptsSecretsGetResultSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsGetResultSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsGetResult = | DispatchNamespacesScriptsSecretsGetResultSecretText | DispatchNamespacesScriptsSecretsGetResultSecretKey; export const DispatchNamespacesScriptsSecretsGetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "text", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ]), ); export type GetDispatchNamespaceScriptSecretResponse = DispatchNamespacesScriptsSecretsGetResult; export const GetDispatchNamespaceScriptSecretResponse = /*@__PURE__*/ S.suspend( () => DispatchNamespacesScriptsSecretsGetResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetDispatchNamespaceScriptSecretResponse", }) as any as S.Schema; export interface GetDispatchNamespaceScriptSettingRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const GetDispatchNamespaceScriptSettingRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptSettingRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemAIType = "ai"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAIType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemAI { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAIType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAI = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAIType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemAI", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchType = "ai_search"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearch { /** The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance. */ instanceName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchType; /** The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field. */ namespace?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearch = /*@__PURE__*/ S.suspend(() => S.Struct({ instanceName: S.String.pipe(T.Body("instance_name")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchType, namespace: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearch", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespaceType = "ai_search_namespace"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespaceType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngineType = "analytics_engine"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngineType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngine { /** The name of the dataset to bind to. */ dataset: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngineType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngine = /*@__PURE__*/ S.suspend(() => S.Struct({ dataset: S.String, name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngineType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngine", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssetsType = "assets"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssetsType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssets { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssetsType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssets = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssetsType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssets", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowserType = "browser"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowserType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowser { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowserType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowser = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowserType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowser", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1Type = "d1"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1Type = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1 { /** Identifier of the D1 database to bind to. */ databaseId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1Type; /** Identifier of the D1 database to bind to. */ id?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1 = /*@__PURE__*/ S.suspend(() => S.Struct({ databaseId: S.String.pipe(T.Body("database_id")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1Type, id: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlobType = "data_blob"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the data content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlobType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceType = "dispatch_namespace"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsItem = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsItem = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundWorker = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundWorker = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutbound { /** Pass information from the Dispatch Worker to the Outbound Worker through the parameters. */ params?: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsList | null; /** Outbound worker. */ worker?: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutbound = /*@__PURE__*/ S.suspend(() => S.Struct({ params: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutboundParamsList, ), ), worker: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutbound", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The name of the dispatch namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceType; /** Outbound worker. */ outbound?: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutbound | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceType, outbound: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespaceOutbound, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespaceType = "durable_object_namespace"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespaceType; /** The exported class name of the Durable Object. */ className?: string | null; /** The dispatch namespace the Durable Object script belongs to. */ dispatchNamespace?: string | null; /** The environment of the script_name to bind to. */ environment?: string | null; /** Namespace identifier tag. */ namespaceId?: string | null; /** The script where the Durable Object is defined, if it is external to this Worker. */ scriptName?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespaceType, className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), dispatchNamespace: S.optional( S.NullOr(S.String).pipe(T.Body("dispatch_namespace")), ), environment: S.optional(S.NullOr(S.String)), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdriveType = "hyperdrive"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdriveType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdrive { /** Identifier of the Hyperdrive connection to bind to. */ id: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdriveType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdrive = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdriveType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdrive", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemInheritType = "inherit"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemInheritType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemInherit { /** The name of the inherited binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemInheritType; /** The old name of the inherited binding. If set, the binding will be renamed from `old_name` to `name` in the new version. If not set, the binding will keep the same name between versions. */ oldName?: string | null; /** Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version. */ versionId?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemInherit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemInheritType, oldName: S.optional(S.NullOr(S.String).pipe(T.Body("old_name"))), versionId: S.optional(S.NullOr(S.String).pipe(T.Body("version_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemInherit", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemImagesType = "images"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemImagesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemImages { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemImagesType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemImages = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemImagesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemImages", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemJsonType = "json"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemJsonType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemJson { /** JSON data to use. */ json: unknown; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemJsonType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemJson = /*@__PURE__*/ S.suspend(() => S.Struct({ json: S.Unknown, name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemJsonType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemJson", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespaceType = "kv_namespace"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespace { /** A JavaScript variable name for the binding. */ name: string; /** Namespace identifier tag. */ namespaceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespaceType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemMediaType = "media"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemMediaType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemMedia { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemMediaType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemMedia = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemMediaType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemMedia", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificateType = "mtls_certificate"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificateType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificate { /** Identifier of the certificate to bind to. */ certificateId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificateType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificate = /*@__PURE__*/ S.suspend(() => S.Struct({ certificateId: S.String.pipe(T.Body("certificate_id")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificateType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificate", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainTextType = "plain_text"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainText { /** A JavaScript variable name for the binding. */ name: string; /** The text value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainTextType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainText", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelinesType = "pipelines"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelinesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelines { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Pipeline to bind to. */ pipeline: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelinesType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelines = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, pipeline: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelinesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelines", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueueType = "queue"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueueType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueue { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Queue to bind to. */ queueName: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueueType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueue = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, queueName: S.String.pipe(T.Body("queue_name")), type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueueType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueue", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitSimple = DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitSimple = DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitType = "ratelimit"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimit { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the rate limit namespace to bind to. */ namespaceId: string; /** The rate limit configuration. */ simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimitType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimit", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketType = "r2_bucket"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketJurisdiction = | "eu" | "fedramp" | "fedramp-high"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketJurisdiction = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2Bucket { /** R2 bucket to bind to. */ bucketName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketType; /** The [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions) of the R2 bucket. */ jurisdiction?: DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketJurisdiction | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2Bucket = /*@__PURE__*/ S.suspend(() => S.Struct({ bucketName: S.String.pipe(T.Body("bucket_name")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketType, jurisdiction: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2BucketJurisdiction, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2Bucket", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretTextType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailType = "send_email"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedDestinationAddressesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedDestinationAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedSenderAddressesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedSenderAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmail { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailType; /** List of allowed destination addresses. */ allowedDestinationAddresses?: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedDestinationAddressesList | null; /** List of allowed sender addresses. */ allowedSenderAddresses?: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedSenderAddressesList | null; /** Destination address for the email. */ destinationAddress?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmail = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailType, allowedDestinationAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedDestinationAddressesList, ).pipe(T.Body("allowed_destination_addresses")), ), allowedSenderAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmailAllowedSenderAddressesList, ).pipe(T.Body("allowed_sender_addresses")), ), destinationAddress: S.optional( S.NullOr(S.String).pipe(T.Body("destination_address")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmail", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemServiceType = "service"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemService { /** A JavaScript variable name for the binding. */ name: string; /** Name of Worker to bind to. */ service: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemServiceType; /** Entrypoint to invoke on the target Worker. */ entrypoint?: string | null; /** Optional environment if the Worker utilizes one. */ environment?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, service: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemServiceType, entrypoint: S.optional(S.NullOr(S.String)), environment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemService", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlobType = "text_blob"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the text content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlobType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorizeType = "vectorize"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorizeType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorize { /** Name of the Vectorize index to bind to. */ indexName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorizeType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorize = /*@__PURE__*/ S.suspend(() => S.Struct({ indexName: S.String.pipe(T.Body("index_name")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorizeType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorize", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadataType = "version_metadata"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadataType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadata { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadataType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadataType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadata", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecretType = "secrets_store_secret"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecretType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecret { /** A JavaScript variable name for the binding. */ name: string; /** Name of the secret in the store. */ secretName: string; /** ID of the store containing the secret. */ storeId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecretType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecret = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, secretName: S.String.pipe(T.Body("secret_name")), storeId: S.String.pipe(T.Body("store_id")), type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecretType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecret", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagshipType = "flagship"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagshipType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagship { /** ID of the Flagship app to bind to for feature flag evaluation. */ appId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagshipType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagship = /*@__PURE__*/ S.suspend(() => S.Struct({ appId: S.String.pipe(T.Body("app_id")), name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagshipType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagship", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyType, usages: DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflowType = "workflow"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflowType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflow { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflowType; /** Name of the Workflow to bind to. */ workflowName: string; /** Class name of the Workflow. Should only be provided if the Workflow belongs to this script. */ className?: string | null; /** Script name that contains the Workflow. If not provided, defaults to this script name. */ scriptName?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflow = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflowType, workflowName: S.String.pipe(T.Body("workflow_name")), className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflow", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModuleType = "wasm_module"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModuleType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModule { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the WebAssembly module content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModuleType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModule = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModuleType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModule", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCServiceType = "vpc_service"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCService { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the VPC service to bind to. */ serviceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCServiceType; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, serviceId: S.String.pipe(T.Body("service_id")), type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCServiceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCService", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetworkType = "vpc_network"; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetworkType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetwork { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetworkType; /** Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id. */ networkId?: string | null; /** UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id. */ tunnelId?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetwork = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetworkType, networkId: S.optional(S.NullOr(S.String).pipe(T.Body("network_id"))), tunnelId: S.optional(S.NullOr(S.String).pipe(T.Body("tunnel_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetwork", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseBindingsItem = | DispatchNamespacesScriptsSettingsGetResponseBindingsItemAI | DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearch | DispatchNamespacesScriptsSettingsGetResponseBindingsItemAISearchNamespace | DispatchNamespacesScriptsSettingsGetResponseBindingsItemAnalyticsEngine | DispatchNamespacesScriptsSettingsGetResponseBindingsItemAssets | DispatchNamespacesScriptsSettingsGetResponseBindingsItemBrowser | DispatchNamespacesScriptsSettingsGetResponseBindingsItemD1 | DispatchNamespacesScriptsSettingsGetResponseBindingsItemDataBlob | DispatchNamespacesScriptsSettingsGetResponseBindingsItemDispatchNamespace | DispatchNamespacesScriptsSettingsGetResponseBindingsItemDurableObjectNamespace | DispatchNamespacesScriptsSettingsGetResponseBindingsItemHyperdrive | DispatchNamespacesScriptsSettingsGetResponseBindingsItemInherit | DispatchNamespacesScriptsSettingsGetResponseBindingsItemImages | DispatchNamespacesScriptsSettingsGetResponseBindingsItemJson | DispatchNamespacesScriptsSettingsGetResponseBindingsItemKVNamespace | DispatchNamespacesScriptsSettingsGetResponseBindingsItemMedia | DispatchNamespacesScriptsSettingsGetResponseBindingsItemMTLSCertificate | DispatchNamespacesScriptsSettingsGetResponseBindingsItemPlainText | DispatchNamespacesScriptsSettingsGetResponseBindingsItemPipelines | DispatchNamespacesScriptsSettingsGetResponseBindingsItemQueue | DispatchNamespacesScriptsSettingsGetResponseBindingsItemRatelimit | DispatchNamespacesScriptsSettingsGetResponseBindingsItemR2Bucket | DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretText | DispatchNamespacesScriptsSettingsGetResponseBindingsItemSendEmail | DispatchNamespacesScriptsSettingsGetResponseBindingsItemService | DispatchNamespacesScriptsSettingsGetResponseBindingsItemTextBlob | DispatchNamespacesScriptsSettingsGetResponseBindingsItemVectorize | DispatchNamespacesScriptsSettingsGetResponseBindingsItemVersionMetadata | DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretsStoreSecret | DispatchNamespacesScriptsSettingsGetResponseBindingsItemFlagship | DispatchNamespacesScriptsSettingsGetResponseBindingsItemSecretKey | DispatchNamespacesScriptsSettingsGetResponseBindingsItemWorkflow | DispatchNamespacesScriptsSettingsGetResponseBindingsItemWasmModule | DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCService | DispatchNamespacesScriptsSettingsGetResponseBindingsItemVPCNetwork; export const DispatchNamespacesScriptsSettingsGetResponseBindingsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["instanceName", "name", "type", "namespace"], ["name", "namespace", "type"], ["dataset", "name", "type"], ["name", "type"], ["name", "type"], ["databaseId", "name", "type", "id"], ["name", "part", "type"], ["name", "namespace", "type", "outbound"], [ "name", "type", "className", "dispatchNamespace", "environment", "namespaceId", "scriptName", ], ["id", "name", "type"], ["name", "type", "oldName", "versionId"], ["name", "type"], ["json", "name", "type"], ["name", "namespaceId", "type"], ["name", "type"], ["certificateId", "name", "type"], ["name", "text", "type"], ["name", "pipeline", "type"], ["name", "queueName", "type"], ["name", "namespaceId", "simple", "type"], ["bucketName", "name", "type", "jurisdiction"], ["name", "text", "type"], [ "name", "type", "allowedDestinationAddresses", "allowedSenderAddresses", "destinationAddress", ], ["name", "service", "type", "entrypoint", "environment"], ["name", "part", "type"], ["indexName", "name", "type"], ["name", "type"], ["name", "secretName", "storeId", "type"], ["appId", "name", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ["name", "type", "workflowName", "className", "scriptName"], ["name", "part", "type"], ["name", "serviceId", "type"], ["name", "type", "networkId", "tunnelId"], ]), ); export type DispatchNamespacesScriptsSettingsGetResponseBindingsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseBindingsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseBindingsItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export const DispatchNamespacesScriptsSettingsGetResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export type DispatchNamespacesScriptsSettingsGetResponseCompatibilityFlagsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseCompatibilityFlagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseExportsValueType = | "worker" | "durable-object"; export const DispatchNamespacesScriptsSettingsGetResponseExportsValueType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseExportsValueCache { /** Whether caching is enabled for this entrypoint. */ enabled: boolean; } export const DispatchNamespacesScriptsSettingsGetResponseExportsValueCache = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseExportsValueCache", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseExportsValue { /** The kind of export. */ type: DispatchNamespacesScriptsSettingsGetResponseExportsValueType; /** Cache override for this entrypoint. It applies only to */ cache?: DispatchNamespacesScriptsSettingsGetResponseExportsValueCache | null; } export const DispatchNamespacesScriptsSettingsGetResponseExportsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ type: DispatchNamespacesScriptsSettingsGetResponseExportsValueType, cache: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseExportsValueCache), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseExportsValue", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseExportsMap = { [key: string]: | DispatchNamespacesScriptsSettingsGetResponseExportsValue | undefined; }; export const DispatchNamespacesScriptsSettingsGetResponseExportsMap = /*@__PURE__*/ S.Record( S.String, DispatchNamespacesScriptsSettingsGetResponseExportsValue, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseLimits { /** The amount of CPU time this Worker can use in milliseconds. */ cpuMs?: number | null; /** The number of subrequests this Worker can make per request. */ subrequests?: number | null; } export const DispatchNamespacesScriptsSettingsGetResponseLimits = /*@__PURE__*/ S.suspend(() => S.Struct({ cpuMs: S.optional(S.NullOr(S.Number).pipe(T.Body("cpu_ms"))), subrequests: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseLimits", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationDeletedClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationDeletedClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewSqliteClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewSqliteClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem { from?: string | null; to?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ from: S.optional(S.NullOr(S.String)), to: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem { from?: string | null; fromScript?: string | null; to?: string | null; } export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ from: S.optional(S.NullOr(S.String)), fromScript: S.optional(S.NullOr(S.String).pipe(T.Body("from_script"))), to: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigration { /** A list of classes to delete Durable Object namespaces from. */ deletedClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationDeletedClassesList | null; /** A list of classes to create Durable Object namespaces from. */ newClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewClassesList | null; /** A list of classes to create Durable Object namespaces with SQLite from. */ newSqliteClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewSqliteClassesList | null; /** Tag to set as the latest migration tag. */ newTag?: string | null; /** Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. */ oldTag?: string | null; /** A list of classes with Durable Object namespaces that were renamed. */ renamedClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesList | null; /** A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. */ transferredClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesList | null; } export const DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigration = /*@__PURE__*/ S.suspend(() => S.Struct({ deletedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationDeletedClassesList, ).pipe(T.Body("deleted_classes")), ), newClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewClassesList, ).pipe(T.Body("new_classes")), ), newSqliteClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationNewSqliteClassesList, ).pipe(T.Body("new_sqlite_classes")), ), newTag: S.optional(S.NullOr(S.String).pipe(T.Body("new_tag"))), oldTag: S.optional(S.NullOr(S.String).pipe(T.Body("old_tag"))), renamedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesList, ).pipe(T.Body("renamed_classes")), ), transferredClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesList, ).pipe(T.Body("transferred_classes")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigration", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItem { /** A list of classes to delete Durable Object namespaces from. */ deletedClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList | null; /** A list of classes to create Durable Object namespaces from. */ newClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList | null; /** A list of classes to create Durable Object namespaces with SQLite from. */ newSqliteClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList | null; /** A list of classes with Durable Object namespaces that were renamed. */ renamedClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList | null; /** A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. */ transferredClasses?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList | null; } export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ deletedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList, ).pipe(T.Body("deleted_classes")), ), newClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList, ).pipe(T.Body("new_classes")), ), newSqliteClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList, ).pipe(T.Body("new_sqlite_classes")), ), renamedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList, ).pipe(T.Body("renamed_classes")), ), transferredClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList, ).pipe(T.Body("transferred_classes")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItem", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrations { /** Tag to set as the latest migration tag. */ newTag?: string | null; /** Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. */ oldTag?: string | null; /** Migrations to apply in order. */ steps?: DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsList | null; } export const DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrations = /*@__PURE__*/ S.suspend(() => S.Struct({ newTag: S.optional(S.NullOr(S.String).pipe(T.Body("new_tag"))), oldTag: S.optional(S.NullOr(S.String).pipe(T.Body("old_tag"))), steps: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrationsStepsList, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrations", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseMigrations = | DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigration | DispatchNamespacesScriptsSettingsGetResponseMigrationsWorkersMultipleStepMigrations; export const DispatchNamespacesScriptsSettingsGetResponseMigrations = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "deletedClasses", "newClasses", "newSqliteClasses", "newTag", "oldTag", "renamedClasses", "transferredClasses", ], ["newTag", "oldTag", "steps"], ]), ); export type DispatchNamespacesScriptsSettingsGetResponseObservabilityLogsDestinationsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseObservabilityLogsDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseObservabilityLogs { /** Whether logs are enabled for the Worker. */ enabled: boolean; /** Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. */ invocationLogs: boolean; /** A list of destinations where logs will be exported to. */ destinations?: DispatchNamespacesScriptsSettingsGetResponseObservabilityLogsDestinationsList | null; /** The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether log persistence is enabled for the Worker. */ persist?: boolean | null; } export const DispatchNamespacesScriptsSettingsGetResponseObservabilityLogs = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, invocationLogs: S.Boolean.pipe(T.Body("invocation_logs")), destinations: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseObservabilityLogsDestinationsList, ), ), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseObservabilityLogs", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesDestinationsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesPropagationPolicy = | "authenticated" | "accept"; export const DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesPropagationPolicy = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponseObservabilityTraces { /** A list of destinations where traces will be exported to. */ destinations?: DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesDestinationsList | null; /** Whether traces are enabled for the Worker. */ enabled?: boolean | null; /** The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether trace persistence is enabled for the Worker. */ persist?: boolean | null; /** Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" (default) honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. */ propagationPolicy?: DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesPropagationPolicy | null; } export const DispatchNamespacesScriptsSettingsGetResponseObservabilityTraces = /*@__PURE__*/ S.suspend(() => S.Struct({ destinations: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesDestinationsList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), propagationPolicy: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseObservabilityTracesPropagationPolicy, ).pipe(T.Body("propagation_policy")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseObservabilityTraces", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponseObservability { /** Whether observability is enabled for the Worker. */ enabled: boolean; /** The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Log settings for the Worker. */ logs?: DispatchNamespacesScriptsSettingsGetResponseObservabilityLogs | null; /** Trace settings for the Worker. */ traces?: DispatchNamespacesScriptsSettingsGetResponseObservabilityTraces | null; } export const DispatchNamespacesScriptsSettingsGetResponseObservability = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), logs: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseObservabilityLogs), ), traces: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseObservabilityTraces, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponseObservability", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementModeMode = "smart"; export const DispatchNamespacesScriptsSettingsGetResponsePlacementModeMode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementMode { /** Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementModeMode; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementMode = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementModeMode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementMode", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementRegion { /** Cloud region for targeted placement in format 'provider:region'. */ region: string; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementRegion = /*@__PURE__*/ S.suspend(() => S.Struct({ region: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementRegion", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsSettingsGetResponsePlacementHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementHost { /** TCP host and port for targeted placement. */ host: string; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementHost = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementHost", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase4Mode = "targeted"; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase4Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementCase4 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase4Mode; /** Cloud region for targeted placement in format 'provider:region'. */ region: string; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase4Mode, region: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementCase4", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase5Mode = "targeted"; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase5Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementCase5 { /** HTTP hostname for targeted placement. */ hostname: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase5Mode; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase5Mode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementCase5", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase6Mode = "targeted"; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase6Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementCase6 { /** TCP host and port for targeted placement. */ host: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase6Mode; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase6 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase6Mode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementCase6", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7Mode = "targeted"; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItem = | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["region"], ["hostname"], ["host"]]), ); export type DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetList = Array; export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsGetResponsePlacementCase7 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase7Mode; /** Array of placement targets (currently limited to single target). */ target: DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetList; } export const DispatchNamespacesScriptsSettingsGetResponsePlacementCase7 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsGetResponsePlacementCase7Mode, target: DispatchNamespacesScriptsSettingsGetResponsePlacementCase7TargetList, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsGetResponsePlacementCase7", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponsePlacement = | DispatchNamespacesScriptsSettingsGetResponsePlacementMode | DispatchNamespacesScriptsSettingsGetResponsePlacementRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsSettingsGetResponsePlacementHost | DispatchNamespacesScriptsSettingsGetResponsePlacementCase4 | DispatchNamespacesScriptsSettingsGetResponsePlacementCase5 | DispatchNamespacesScriptsSettingsGetResponsePlacementCase6 | DispatchNamespacesScriptsSettingsGetResponsePlacementCase7; export const DispatchNamespacesScriptsSettingsGetResponsePlacement = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["mode"], ["region"], ["hostname"], ["host"], ["mode", "region"], ["hostname", "mode"], ["host", "mode"], ["mode", "target"], ]), ); export type DispatchNamespacesScriptsSettingsGetResponseTagsList = Array; export const DispatchNamespacesScriptsSettingsGetResponseTagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export const DispatchNamespacesScriptsSettingsGetResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export type DispatchNamespacesScriptsSettingsGetResponseTailConsumersList = Array; export const DispatchNamespacesScriptsSettingsGetResponseTailConsumersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptTailConsumersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsGetResponseUsageModel = | "standard" | "bundled" | "unbound"; export const DispatchNamespacesScriptsSettingsGetResponseUsageModel = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDispatchNamespaceScriptSettingResponse { /** List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */ bindings?: DispatchNamespacesScriptsSettingsGetResponseBindingsList | null; /** Global CacheW configuration for the Worker. When caching is on, */ cacheOptions?: DispatchNamespacesScriptsGetResponseScriptCacheOptions | null; /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: string | null; /** 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`. */ compatibilityFlags?: DispatchNamespacesScriptsSettingsGetResponseCompatibilityFlagsList | null; /** Declarative exports for the Worker. Worker entrypoint entries */ exports?: DispatchNamespacesScriptsSettingsGetResponseExportsMap | null; /** Limits to apply for this Worker. */ limits?: DispatchNamespacesScriptsSettingsGetResponseLimits | null; /** Whether Logpush is turned on for the Worker. */ logpush?: boolean | null; /** Migrations to apply for Durable Objects associated with this Worker. */ migrations?: DispatchNamespacesScriptsSettingsGetResponseMigrations | null; /** Observability settings for the Worker. */ observability?: DispatchNamespacesScriptsSettingsGetResponseObservability | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: DispatchNamespacesScriptsSettingsGetResponsePlacement | null; /** Tags associated with the Worker. */ tags?: DispatchNamespacesScriptsSettingsGetResponseTagsList | null; /** List of Workers that will consume logs from the attached Worker. */ tailConsumers?: DispatchNamespacesScriptsSettingsGetResponseTailConsumersList | null; /** Usage model for the Worker invocations. */ usageModel?: DispatchNamespacesScriptsSettingsGetResponseUsageModel | null; } export const GetDispatchNamespaceScriptSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ bindings: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseBindingsList), ), cacheOptions: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptCacheOptions).pipe( T.Body("cache_options"), ), ), compatibilityDate: S.optional( S.NullOr(S.String).pipe(T.Body("compatibility_date")), ), compatibilityFlags: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseCompatibilityFlagsList, ).pipe(T.Body("compatibility_flags")), ), exports: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseExportsMap), ), limits: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseLimits), ), logpush: S.optional(S.NullOr(S.Boolean)), migrations: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseMigrations), ), observability: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseObservability), ), placement: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponsePlacement), ), tags: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseTagsList), ), tailConsumers: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsGetResponseTailConsumersList, ).pipe(T.Body("tail_consumers")), ), usageModel: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseUsageModel).pipe( T.Body("usage_model"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDispatchNamespaceScriptSettingResponse", }) as any as S.Schema; export interface ListDispatchNamespacesRequest { /** Identifier. */ accountId: string; } export const ListDispatchNamespacesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespacesRequest", }) as any as S.Schema; export interface DispatchNamespacesListResultItem { /** Identifier. */ createdBy?: string | null; /** When the script was created. */ createdOn?: string | null; /** Identifier. */ modifiedBy?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** API Resource UUID tag. */ namespaceId?: string | null; /** Name of the Workers for Platforms dispatch namespace. */ namespaceName?: string | null; /** The current number of scripts in this Dispatch Namespace. */ scriptCount?: number | null; /** Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and `request.cf` is undefined. By default, Workers in a namespace are "untrusted". */ trustedWorkers?: boolean | null; } export const DispatchNamespacesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdBy: S.optional(S.NullOr(S.String).pipe(T.Body("created_by"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), modifiedBy: S.optional(S.NullOr(S.String).pipe(T.Body("modified_by"))), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), namespaceName: S.optional( S.NullOr(S.String).pipe(T.Body("namespace_name")), ), scriptCount: S.optional(S.NullOr(S.Number).pipe(T.Body("script_count"))), trustedWorkers: S.optional( S.NullOr(S.Boolean).pipe(T.Body("trusted_workers")), ), }), ).annotate({ identifier: "DispatchNamespacesListResultItem", }) as any as S.Schema; export type DispatchNamespacesListResultList = Array; export const DispatchNamespacesListResultList = /*@__PURE__*/ S.Array( DispatchNamespacesListResultItem, ) as any as S.Schema; export interface ListDispatchNamespacesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DispatchNamespacesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListDispatchNamespacesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: DispatchNamespacesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespacesResponse", }) as any as S.Schema; export interface ListDispatchNamespaceScriptSecretsRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const ListDispatchNamespaceScriptSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespaceScriptSecretsRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsListResultItemSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSecretsListResultItemSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSecretsListResultItemSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsListResultItemSecretTextType; } export const DispatchNamespacesScriptsSecretsListResultItemSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSecretsListResultItemSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsListResultItemSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsListResultItemSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsListResultItemSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsListResultItemSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSecretsListResultItemSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSecretsListResultItemSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSecretsListResultItemSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsListResultItemSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSecretsListResultItemSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSecretsListResultItemSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSecretsListResultItemSecretKeyType, usages: DispatchNamespacesScriptsSecretsListResultItemSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsListResultItemSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsListResultItem = | DispatchNamespacesScriptsSecretsListResultItemSecretText | DispatchNamespacesScriptsSecretsListResultItemSecretKey; export const DispatchNamespacesScriptsSecretsListResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "text", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ]), ); export type DispatchNamespacesScriptsSecretsListResultList = Array; export const DispatchNamespacesScriptsSecretsListResultList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsListResultItem, ) as any as S.Schema; export interface ListDispatchNamespaceScriptSecretsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DispatchNamespacesScriptsSecretsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListDispatchNamespaceScriptSecretsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: DispatchNamespacesScriptsSecretsListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespaceScriptSecretsResponse", }) as any as S.Schema; export interface ListDispatchNamespaceScriptTagsRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const ListDispatchNamespaceScriptTagsRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespaceScriptTagsRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsTagsListResultList = Array; export const DispatchNamespacesScriptsTagsListResultList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ListDispatchNamespaceScriptTagsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DispatchNamespacesScriptsTagsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListDispatchNamespaceScriptTagsResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ result: DispatchNamespacesScriptsTagsListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDispatchNamespaceScriptTagsResponse", }) as any as S.Schema; export interface PatchDispatchNamespaceScriptSettingRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; } export const PatchDispatchNamespaceScriptSettingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchDispatchNamespaceScriptSettingRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemAIType = "ai"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAIType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemAI { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAIType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAI = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAIType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemAI", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchType = "ai_search"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearch { /** The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance. */ instanceName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchType; /** The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field. */ namespace?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearch = /*@__PURE__*/ S.suspend(() => S.Struct({ instanceName: S.String.pipe(T.Body("instance_name")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchType, namespace: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearch", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespaceType = "ai_search_namespace"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespaceType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngineType = "analytics_engine"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngineType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngine { /** The name of the dataset to bind to. */ dataset: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngineType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngine = /*@__PURE__*/ S.suspend(() => S.Struct({ dataset: S.String, name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngineType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngine", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssetsType = "assets"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssetsType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssets { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssetsType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssets = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssetsType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssets", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowserType = "browser"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowserType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowser { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowserType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowser = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowserType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowser", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1Type = "d1"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1Type = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1 { /** Identifier of the D1 database to bind to. */ databaseId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1Type; /** Identifier of the D1 database to bind to. */ id?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1 = /*@__PURE__*/ S.suspend(() => S.Struct({ databaseId: S.String.pipe(T.Body("database_id")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1Type, id: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlobType = "data_blob"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the data content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlobType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceType = "dispatch_namespace"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsItem = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsItem = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundParamsItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundWorker = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundWorker = DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutbound { /** Pass information from the Dispatch Worker to the Outbound Worker through the parameters. */ params?: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsList | null; /** Outbound worker. */ worker?: DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutbound = /*@__PURE__*/ S.suspend(() => S.Struct({ params: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutboundParamsList, ), ), worker: S.optional( S.NullOr( DispatchNamespacesScriptsBindingsGetResultItemDispatchNamespaceOutboundWorker, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutbound", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The name of the dispatch namespace. */ namespace: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceType; /** Outbound worker. */ outbound?: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutbound | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespace: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceType, outbound: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespaceOutbound, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespaceType = "durable_object_namespace"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespace { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespaceType; /** The exported class name of the Durable Object. */ className?: string | null; /** The dispatch namespace the Durable Object script belongs to. */ dispatchNamespace?: string | null; /** The environment of the script_name to bind to. */ environment?: string | null; /** Namespace identifier tag. */ namespaceId?: string | null; /** The script where the Durable Object is defined, if it is external to this Worker. */ scriptName?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespaceType, className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), dispatchNamespace: S.optional( S.NullOr(S.String).pipe(T.Body("dispatch_namespace")), ), environment: S.optional(S.NullOr(S.String)), namespaceId: S.optional(S.NullOr(S.String).pipe(T.Body("namespace_id"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdriveType = "hyperdrive"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdriveType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdrive { /** Identifier of the Hyperdrive connection to bind to. */ id: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdriveType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdrive = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdriveType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdrive", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemInheritType = "inherit"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemInheritType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemInherit { /** The name of the inherited binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemInheritType; /** The old name of the inherited binding. If set, the binding will be renamed from `old_name` to `name` in the new version. If not set, the binding will keep the same name between versions. */ oldName?: string | null; /** Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version. */ versionId?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemInherit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemInheritType, oldName: S.optional(S.NullOr(S.String).pipe(T.Body("old_name"))), versionId: S.optional(S.NullOr(S.String).pipe(T.Body("version_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemInherit", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemImagesType = "images"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemImagesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemImages { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemImagesType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemImages = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemImagesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemImages", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemJsonType = "json"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemJsonType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemJson { /** JSON data to use. */ json: unknown; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemJsonType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemJson = /*@__PURE__*/ S.suspend(() => S.Struct({ json: S.Unknown, name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemJsonType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemJson", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespaceType = "kv_namespace"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespaceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespace { /** A JavaScript variable name for the binding. */ name: string; /** Namespace identifier tag. */ namespaceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespaceType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespace = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespaceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespace", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemMediaType = "media"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemMediaType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemMedia { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemMediaType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemMedia = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemMediaType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemMedia", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificateType = "mtls_certificate"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificateType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificate { /** Identifier of the certificate to bind to. */ certificateId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificateType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificate = /*@__PURE__*/ S.suspend(() => S.Struct({ certificateId: S.String.pipe(T.Body("certificate_id")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificateType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificate", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainTextType = "plain_text"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainText { /** A JavaScript variable name for the binding. */ name: string; /** The text value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainTextType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainText", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelinesType = "pipelines"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelinesType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelines { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Pipeline to bind to. */ pipeline: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelinesType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelines = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, pipeline: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelinesType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelines", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueueType = "queue"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueueType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueue { /** A JavaScript variable name for the binding. */ name: string; /** Name of the Queue to bind to. */ queueName: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueueType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueue = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, queueName: S.String.pipe(T.Body("queue_name")), type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueueType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueue", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitSimple = DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitSimple = DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitType = "ratelimit"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimit { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the rate limit namespace to bind to. */ namespaceId: string; /** The rate limit configuration. */ simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, namespaceId: S.String.pipe(T.Body("namespace_id")), simple: DispatchNamespacesScriptsBindingsGetResultItemRatelimitSimple, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimitType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimit", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketType = "r2_bucket"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketJurisdiction = | "eu" | "fedramp" | "fedramp-high"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketJurisdiction = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2Bucket { /** R2 bucket to bind to. */ bucketName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketType; /** The [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions) of the R2 bucket. */ jurisdiction?: DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketJurisdiction | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2Bucket = /*@__PURE__*/ S.suspend(() => S.Struct({ bucketName: S.String.pipe(T.Body("bucket_name")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketType, jurisdiction: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2BucketJurisdiction, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2Bucket", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretTextType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailType = "send_email"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedDestinationAddressesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedDestinationAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedSenderAddressesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedSenderAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmail { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailType; /** List of allowed destination addresses. */ allowedDestinationAddresses?: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedDestinationAddressesList | null; /** List of allowed sender addresses. */ allowedSenderAddresses?: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedSenderAddressesList | null; /** Destination address for the email. */ destinationAddress?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmail = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailType, allowedDestinationAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedDestinationAddressesList, ).pipe(T.Body("allowed_destination_addresses")), ), allowedSenderAddresses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmailAllowedSenderAddressesList, ).pipe(T.Body("allowed_sender_addresses")), ), destinationAddress: S.optional( S.NullOr(S.String).pipe(T.Body("destination_address")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmail", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemServiceType = "service"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemService { /** A JavaScript variable name for the binding. */ name: string; /** Name of Worker to bind to. */ service: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemServiceType; /** Entrypoint to invoke on the target Worker. */ entrypoint?: string | null; /** Optional environment if the Worker utilizes one. */ environment?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, service: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemServiceType, entrypoint: S.optional(S.NullOr(S.String)), environment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemService", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlobType = "text_blob"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlobType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlob { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the text content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlobType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlob = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlobType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlob", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorizeType = "vectorize"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorizeType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorize { /** Name of the Vectorize index to bind to. */ indexName: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorizeType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorize = /*@__PURE__*/ S.suspend(() => S.Struct({ indexName: S.String.pipe(T.Body("index_name")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorizeType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorize", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadataType = "version_metadata"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadataType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadata { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadataType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadataType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadata", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecretType = "secrets_store_secret"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecretType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecret { /** A JavaScript variable name for the binding. */ name: string; /** Name of the secret in the store. */ secretName: string; /** ID of the store containing the secret. */ storeId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecretType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecret = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, secretName: S.String.pipe(T.Body("secret_name")), storeId: S.String.pipe(T.Body("store_id")), type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecretType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecret", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagshipType = "flagship"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagshipType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagship { /** ID of the Flagship app to bind to for feature flag evaluation. */ appId: string; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagshipType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagship = /*@__PURE__*/ S.suspend(() => S.Struct({ appId: S.String.pipe(T.Body("app_id")), name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagshipType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagship", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyType, usages: DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflowType = "workflow"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflowType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflow { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflowType; /** Name of the Workflow to bind to. */ workflowName: string; /** Class name of the Workflow. Should only be provided if the Workflow belongs to this script. */ className?: string | null; /** Script name that contains the Workflow. If not provided, defaults to this script name. */ scriptName?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflow = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflowType, workflowName: S.String.pipe(T.Body("workflow_name")), className: S.optional(S.NullOr(S.String).pipe(T.Body("class_name"))), scriptName: S.optional(S.NullOr(S.String).pipe(T.Body("script_name"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflow", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModuleType = "wasm_module"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModuleType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModule { /** A JavaScript variable name for the binding. */ name: string; /** The name of the file containing the WebAssembly module content. Only accepted for `service worker syntax` Workers. */ part: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModuleType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModule = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, part: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModuleType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModule", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCServiceType = "vpc_service"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCServiceType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCService { /** A JavaScript variable name for the binding. */ name: string; /** Identifier of the VPC service to bind to. */ serviceId: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCServiceType; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCService = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, serviceId: S.String.pipe(T.Body("service_id")), type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCServiceType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCService", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetworkType = "vpc_network"; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetworkType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetwork { /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetworkType; /** Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id. */ networkId?: string | null; /** UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id. */ tunnelId?: string | null; } export const DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetwork = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetworkType, networkId: S.optional(S.NullOr(S.String).pipe(T.Body("network_id"))), tunnelId: S.optional(S.NullOr(S.String).pipe(T.Body("tunnel_id"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetwork", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseBindingsItem = | DispatchNamespacesScriptsSettingsEditResponseBindingsItemAI | DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearch | DispatchNamespacesScriptsSettingsEditResponseBindingsItemAISearchNamespace | DispatchNamespacesScriptsSettingsEditResponseBindingsItemAnalyticsEngine | DispatchNamespacesScriptsSettingsEditResponseBindingsItemAssets | DispatchNamespacesScriptsSettingsEditResponseBindingsItemBrowser | DispatchNamespacesScriptsSettingsEditResponseBindingsItemD1 | DispatchNamespacesScriptsSettingsEditResponseBindingsItemDataBlob | DispatchNamespacesScriptsSettingsEditResponseBindingsItemDispatchNamespace | DispatchNamespacesScriptsSettingsEditResponseBindingsItemDurableObjectNamespace | DispatchNamespacesScriptsSettingsEditResponseBindingsItemHyperdrive | DispatchNamespacesScriptsSettingsEditResponseBindingsItemInherit | DispatchNamespacesScriptsSettingsEditResponseBindingsItemImages | DispatchNamespacesScriptsSettingsEditResponseBindingsItemJson | DispatchNamespacesScriptsSettingsEditResponseBindingsItemKVNamespace | DispatchNamespacesScriptsSettingsEditResponseBindingsItemMedia | DispatchNamespacesScriptsSettingsEditResponseBindingsItemMTLSCertificate | DispatchNamespacesScriptsSettingsEditResponseBindingsItemPlainText | DispatchNamespacesScriptsSettingsEditResponseBindingsItemPipelines | DispatchNamespacesScriptsSettingsEditResponseBindingsItemQueue | DispatchNamespacesScriptsSettingsEditResponseBindingsItemRatelimit | DispatchNamespacesScriptsSettingsEditResponseBindingsItemR2Bucket | DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretText | DispatchNamespacesScriptsSettingsEditResponseBindingsItemSendEmail | DispatchNamespacesScriptsSettingsEditResponseBindingsItemService | DispatchNamespacesScriptsSettingsEditResponseBindingsItemTextBlob | DispatchNamespacesScriptsSettingsEditResponseBindingsItemVectorize | DispatchNamespacesScriptsSettingsEditResponseBindingsItemVersionMetadata | DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretsStoreSecret | DispatchNamespacesScriptsSettingsEditResponseBindingsItemFlagship | DispatchNamespacesScriptsSettingsEditResponseBindingsItemSecretKey | DispatchNamespacesScriptsSettingsEditResponseBindingsItemWorkflow | DispatchNamespacesScriptsSettingsEditResponseBindingsItemWasmModule | DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCService | DispatchNamespacesScriptsSettingsEditResponseBindingsItemVPCNetwork; export const DispatchNamespacesScriptsSettingsEditResponseBindingsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["instanceName", "name", "type", "namespace"], ["name", "namespace", "type"], ["dataset", "name", "type"], ["name", "type"], ["name", "type"], ["databaseId", "name", "type", "id"], ["name", "part", "type"], ["name", "namespace", "type", "outbound"], [ "name", "type", "className", "dispatchNamespace", "environment", "namespaceId", "scriptName", ], ["id", "name", "type"], ["name", "type", "oldName", "versionId"], ["name", "type"], ["json", "name", "type"], ["name", "namespaceId", "type"], ["name", "type"], ["certificateId", "name", "type"], ["name", "text", "type"], ["name", "pipeline", "type"], ["name", "queueName", "type"], ["name", "namespaceId", "simple", "type"], ["bucketName", "name", "type", "jurisdiction"], ["name", "text", "type"], [ "name", "type", "allowedDestinationAddresses", "allowedSenderAddresses", "destinationAddress", ], ["name", "service", "type", "entrypoint", "environment"], ["name", "part", "type"], ["indexName", "name", "type"], ["name", "type"], ["name", "secretName", "storeId", "type"], ["appId", "name", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ["name", "type", "workflowName", "className", "scriptName"], ["name", "part", "type"], ["name", "serviceId", "type"], ["name", "type", "networkId", "tunnelId"], ]), ); export type DispatchNamespacesScriptsSettingsEditResponseBindingsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseBindingsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsEditResponseBindingsItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export const DispatchNamespacesScriptsSettingsEditResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export type DispatchNamespacesScriptsSettingsEditResponseCompatibilityFlagsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseCompatibilityFlagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseExportsValueType = | "worker" | "durable-object"; export const DispatchNamespacesScriptsSettingsEditResponseExportsValueType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponseExportsValueCache = DispatchNamespacesScriptsSettingsGetResponseExportsValueCache; export const DispatchNamespacesScriptsSettingsEditResponseExportsValueCache = DispatchNamespacesScriptsSettingsGetResponseExportsValueCache; export interface DispatchNamespacesScriptsSettingsEditResponseExportsValue { /** The kind of export. */ type: DispatchNamespacesScriptsSettingsEditResponseExportsValueType; /** Cache override for this entrypoint. It applies only to */ cache?: DispatchNamespacesScriptsSettingsGetResponseExportsValueCache | null; } export const DispatchNamespacesScriptsSettingsEditResponseExportsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ type: DispatchNamespacesScriptsSettingsEditResponseExportsValueType, cache: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseExportsValueCache), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseExportsValue", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseExportsMap = { [key: string]: | DispatchNamespacesScriptsSettingsEditResponseExportsValue | undefined; }; export const DispatchNamespacesScriptsSettingsEditResponseExportsMap = /*@__PURE__*/ S.Record( S.String, DispatchNamespacesScriptsSettingsEditResponseExportsValue, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseLimits = DispatchNamespacesScriptsSettingsGetResponseLimits; export const DispatchNamespacesScriptsSettingsEditResponseLimits = DispatchNamespacesScriptsSettingsGetResponseLimits; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationDeletedClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationDeletedClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewSqliteClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewSqliteClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigration { /** A list of classes to delete Durable Object namespaces from. */ deletedClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationDeletedClassesList | null; /** A list of classes to create Durable Object namespaces from. */ newClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewClassesList | null; /** A list of classes to create Durable Object namespaces with SQLite from. */ newSqliteClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewSqliteClassesList | null; /** Tag to set as the latest migration tag. */ newTag?: string | null; /** Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. */ oldTag?: string | null; /** A list of classes with Durable Object namespaces that were renamed. */ renamedClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesList | null; /** A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. */ transferredClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesList | null; } export const DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigration = /*@__PURE__*/ S.suspend(() => S.Struct({ deletedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationDeletedClassesList, ).pipe(T.Body("deleted_classes")), ), newClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewClassesList, ).pipe(T.Body("new_classes")), ), newSqliteClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationNewSqliteClassesList, ).pipe(T.Body("new_sqlite_classes")), ), newTag: S.optional(S.NullOr(S.String).pipe(T.Body("new_tag"))), oldTag: S.optional(S.NullOr(S.String).pipe(T.Body("old_tag"))), renamedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationRenamedClassesList, ).pipe(T.Body("renamed_classes")), ), transferredClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigrationTransferredClassesList, ).pipe(T.Body("transferred_classes")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigration", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationRenamedClassesItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesItem = DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsGetResponseMigrationsSingleStepMigrationTransferredClassesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItem { /** A list of classes to delete Durable Object namespaces from. */ deletedClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList | null; /** A list of classes to create Durable Object namespaces from. */ newClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList | null; /** A list of classes to create Durable Object namespaces with SQLite from. */ newSqliteClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList | null; /** A list of classes with Durable Object namespaces that were renamed. */ renamedClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList | null; /** A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. */ transferredClasses?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList | null; } export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ deletedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemDeletedClassesList, ).pipe(T.Body("deleted_classes")), ), newClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewClassesList, ).pipe(T.Body("new_classes")), ), newSqliteClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemNewSqliteClassesList, ).pipe(T.Body("new_sqlite_classes")), ), renamedClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemRenamedClassesList, ).pipe(T.Body("renamed_classes")), ), transferredClasses: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItemTransferredClassesList, ).pipe(T.Body("transferred_classes")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItem", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrations { /** Tag to set as the latest migration tag. */ newTag?: string | null; /** Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. */ oldTag?: string | null; /** Migrations to apply in order. */ steps?: DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsList | null; } export const DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrations = /*@__PURE__*/ S.suspend(() => S.Struct({ newTag: S.optional(S.NullOr(S.String).pipe(T.Body("new_tag"))), oldTag: S.optional(S.NullOr(S.String).pipe(T.Body("old_tag"))), steps: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrationsStepsList, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrations", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseMigrations = | DispatchNamespacesScriptsSettingsEditResponseMigrationsSingleStepMigration | DispatchNamespacesScriptsSettingsEditResponseMigrationsWorkersMultipleStepMigrations; export const DispatchNamespacesScriptsSettingsEditResponseMigrations = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "deletedClasses", "newClasses", "newSqliteClasses", "newTag", "oldTag", "renamedClasses", "transferredClasses", ], ["newTag", "oldTag", "steps"], ]), ); export type DispatchNamespacesScriptsSettingsEditResponseObservabilityLogsDestinationsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseObservabilityLogsDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseObservabilityLogs { /** Whether logs are enabled for the Worker. */ enabled: boolean; /** Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. */ invocationLogs: boolean; /** A list of destinations where logs will be exported to. */ destinations?: DispatchNamespacesScriptsSettingsEditResponseObservabilityLogsDestinationsList | null; /** The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether log persistence is enabled for the Worker. */ persist?: boolean | null; } export const DispatchNamespacesScriptsSettingsEditResponseObservabilityLogs = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, invocationLogs: S.Boolean.pipe(T.Body("invocation_logs")), destinations: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseObservabilityLogsDestinationsList, ), ), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseObservabilityLogs", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesDestinationsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesPropagationPolicy = | "authenticated" | "accept"; export const DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesPropagationPolicy = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponseObservabilityTraces { /** A list of destinations where traces will be exported to. */ destinations?: DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesDestinationsList | null; /** Whether traces are enabled for the Worker. */ enabled?: boolean | null; /** The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether trace persistence is enabled for the Worker. */ persist?: boolean | null; /** Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" (default) honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. */ propagationPolicy?: DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesPropagationPolicy | null; } export const DispatchNamespacesScriptsSettingsEditResponseObservabilityTraces = /*@__PURE__*/ S.suspend(() => S.Struct({ destinations: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesDestinationsList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), propagationPolicy: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseObservabilityTracesPropagationPolicy, ).pipe(T.Body("propagation_policy")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseObservabilityTraces", }) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponseObservability { /** Whether observability is enabled for the Worker. */ enabled: boolean; /** The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Log settings for the Worker. */ logs?: DispatchNamespacesScriptsSettingsEditResponseObservabilityLogs | null; /** Trace settings for the Worker. */ traces?: DispatchNamespacesScriptsSettingsEditResponseObservabilityTraces | null; } export const DispatchNamespacesScriptsSettingsEditResponseObservability = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), logs: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseObservabilityLogs, ), ), traces: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseObservabilityTraces, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponseObservability", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacementModeMode = "smart"; export const DispatchNamespacesScriptsSettingsEditResponsePlacementModeMode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponsePlacementMode { /** Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementModeMode; } export const DispatchNamespacesScriptsSettingsEditResponsePlacementMode = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementModeMode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponsePlacementMode", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacementRegion = DispatchNamespacesScriptsSettingsGetResponsePlacementRegion; export const DispatchNamespacesScriptsSettingsEditResponsePlacementRegion = DispatchNamespacesScriptsSettingsGetResponsePlacementRegion; export type DispatchNamespacesScriptsSettingsEditResponsePlacementHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsSettingsEditResponsePlacementHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export type DispatchNamespacesScriptsSettingsEditResponsePlacementHost = DispatchNamespacesScriptsSettingsGetResponsePlacementHost; export const DispatchNamespacesScriptsSettingsEditResponsePlacementHost = DispatchNamespacesScriptsSettingsGetResponsePlacementHost; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase4Mode = "targeted"; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase4Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponsePlacementCase4 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase4Mode; /** Cloud region for targeted placement in format 'provider:region'. */ region: string; } export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase4Mode, region: S.String, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponsePlacementCase4", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase5Mode = "targeted"; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase5Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponsePlacementCase5 { /** HTTP hostname for targeted placement. */ hostname: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase5Mode; } export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase5Mode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponsePlacementCase5", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase6Mode = "targeted"; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase6Mode = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSettingsEditResponsePlacementCase6 { /** TCP host and port for targeted placement. */ host: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase6Mode; } export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase6 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase6Mode, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponsePlacementCase6", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7Mode = "targeted"; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItem = | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["region"], ["hostname"], ["host"]]), ); export type DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetList = Array; export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSettingsEditResponsePlacementCase7 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase7Mode; /** Array of placement targets (currently limited to single target). */ target: DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetList; } export const DispatchNamespacesScriptsSettingsEditResponsePlacementCase7 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsSettingsEditResponsePlacementCase7Mode, target: DispatchNamespacesScriptsSettingsEditResponsePlacementCase7TargetList, }), ).annotate({ identifier: "DispatchNamespacesScriptsSettingsEditResponsePlacementCase7", }) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponsePlacement = | DispatchNamespacesScriptsSettingsEditResponsePlacementMode | DispatchNamespacesScriptsSettingsGetResponsePlacementRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsSettingsGetResponsePlacementHost | DispatchNamespacesScriptsSettingsEditResponsePlacementCase4 | DispatchNamespacesScriptsSettingsEditResponsePlacementCase5 | DispatchNamespacesScriptsSettingsEditResponsePlacementCase6 | DispatchNamespacesScriptsSettingsEditResponsePlacementCase7; export const DispatchNamespacesScriptsSettingsEditResponsePlacement = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["mode"], ["region"], ["hostname"], ["host"], ["mode", "region"], ["hostname", "mode"], ["host", "mode"], ["mode", "target"], ]), ); export type DispatchNamespacesScriptsSettingsEditResponseTagsList = Array; export const DispatchNamespacesScriptsSettingsEditResponseTagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export const DispatchNamespacesScriptsSettingsEditResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export type DispatchNamespacesScriptsSettingsEditResponseTailConsumersList = Array; export const DispatchNamespacesScriptsSettingsEditResponseTailConsumersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptTailConsumersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsSettingsEditResponseUsageModel = | "standard" | "bundled" | "unbound"; export const DispatchNamespacesScriptsSettingsEditResponseUsageModel = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchDispatchNamespaceScriptSettingResponse { /** List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */ bindings?: DispatchNamespacesScriptsSettingsEditResponseBindingsList | null; /** Global CacheW configuration for the Worker. When caching is on, */ cacheOptions?: DispatchNamespacesScriptsGetResponseScriptCacheOptions | null; /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: string | null; /** 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`. */ compatibilityFlags?: DispatchNamespacesScriptsSettingsEditResponseCompatibilityFlagsList | null; /** Declarative exports for the Worker. Worker entrypoint entries */ exports?: DispatchNamespacesScriptsSettingsEditResponseExportsMap | null; /** Limits to apply for this Worker. */ limits?: DispatchNamespacesScriptsSettingsGetResponseLimits | null; /** Whether Logpush is turned on for the Worker. */ logpush?: boolean | null; /** Migrations to apply for Durable Objects associated with this Worker. */ migrations?: DispatchNamespacesScriptsSettingsEditResponseMigrations | null; /** Observability settings for the Worker. */ observability?: DispatchNamespacesScriptsSettingsEditResponseObservability | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: DispatchNamespacesScriptsSettingsEditResponsePlacement | null; /** Tags associated with the Worker. */ tags?: DispatchNamespacesScriptsSettingsEditResponseTagsList | null; /** List of Workers that will consume logs from the attached Worker. */ tailConsumers?: DispatchNamespacesScriptsSettingsEditResponseTailConsumersList | null; /** Usage model for the Worker invocations. */ usageModel?: DispatchNamespacesScriptsSettingsEditResponseUsageModel | null; } export const PatchDispatchNamespaceScriptSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ bindings: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseBindingsList), ), cacheOptions: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptCacheOptions).pipe( T.Body("cache_options"), ), ), compatibilityDate: S.optional( S.NullOr(S.String).pipe(T.Body("compatibility_date")), ), compatibilityFlags: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseCompatibilityFlagsList, ).pipe(T.Body("compatibility_flags")), ), exports: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseExportsMap), ), limits: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsGetResponseLimits), ), logpush: S.optional(S.NullOr(S.Boolean)), migrations: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseMigrations), ), observability: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseObservability), ), placement: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponsePlacement), ), tags: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseTagsList), ), tailConsumers: S.optional( S.NullOr( DispatchNamespacesScriptsSettingsEditResponseTailConsumersList, ).pipe(T.Body("tail_consumers")), ), usageModel: S.optional( S.NullOr(DispatchNamespacesScriptsSettingsEditResponseUsageModel).pipe( T.Body("usage_model"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchDispatchNamespaceScriptSettingResponse", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateRequestBindingsInherit = "strict"; export const DispatchNamespacesScriptsUpdateRequestBindingsInherit = /*@__PURE__*/ S.String; export type PutDispatchNamespaceScriptMetadataStringList = Array; export const PutDispatchNamespaceScriptMetadataStringList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** JSON-encoded metadata about the uploaded parts and Worker configuration. See https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/. */ export interface PutDispatchNamespaceScriptMetadata { annotations?: unknown; assets?: unknown; bindings?: unknown; bodyPart?: string; cache?: unknown; compatibilityDate?: string; compatibilityFlags?: PutDispatchNamespaceScriptMetadataStringList; containers?: unknown; keepAssets?: boolean; keepBindings?: PutDispatchNamespaceScriptMetadataStringList; limits?: unknown; logpush?: boolean; mainModule?: string; migrations?: unknown; observability?: unknown; placement?: unknown; tags?: PutDispatchNamespaceScriptMetadataStringList; tailConsumers?: unknown; usageModel?: string; } export const PutDispatchNamespaceScriptMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({ annotations: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), assets: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), bindings: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), bodyPart: S.optional(S.String.pipe(T.Body("body_part"))), cache: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), compatibilityDate: S.optional(S.String.pipe(T.Body("compatibility_date"))), compatibilityFlags: S.optional( PutDispatchNamespaceScriptMetadataStringList.pipe( T.Body("compatibility_flags"), ), ), containers: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), keepAssets: S.optional(S.Boolean.pipe(T.Body("keep_assets"))), keepBindings: S.optional( PutDispatchNamespaceScriptMetadataStringList.pipe( T.Body("keep_bindings"), ), ), limits: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), logpush: S.optional(S.Boolean), mainModule: S.optional(S.String.pipe(T.Body("main_module"))), migrations: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), observability: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), placement: S.optional( S.Unknown.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), tags: S.optional(PutDispatchNamespaceScriptMetadataStringList), tailConsumers: S.optional( S.Unknown.pipe( T.Body("tail_consumers"), T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), ), usageModel: S.optional(S.String.pipe(T.Body("usage_model"))), }), ).annotate({ identifier: "PutDispatchNamespaceScriptMetadata", }) as any as S.Schema; export interface PutDispatchNamespaceScriptRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** When set to "strict", the upload will fail if any `inherit` type bindings cannot be resolved against the previous version of the script. Without this, unresolvable inherit bindings are silently dropped. */ bindingsInherit?: | DispatchNamespacesScriptsUpdateRequestBindingsInherit | (string & {}); metadata: PutDispatchNamespaceScriptMetadata; /** Module / asset file parts, appended under their own filenames. */ files?: File | Blob | (File | Blob)[]; } export const PutDispatchNamespaceScriptRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), bindingsInherit: S.optional( DispatchNamespacesScriptsUpdateRequestBindingsInherit.pipe( T.Query("bindings_inherit"), ), ), metadata: PutDispatchNamespaceScriptMetadata.pipe( T.KeyDictionary({ abrLevel: "abr_level", allowedDestinationAddresses: "allowed_destination_addresses", allowedSenderAddresses: "allowed_sender_addresses", appId: "app_id", authorEmail: "author_email", authorId: "author_id", bodyPart: "body_part", bucketName: "bucket_name", bytesRead: "bytes_read", cache: "cache_options", capnpSchema: "capnp_schema", certId: "cert_id", certificateId: "certificate_id", className: "class_name", compatibilityDate: "compatibility_date", compatibilityFlags: "compatibility_flags", contentBase64: "content_base64", contentType: "content_type", cpuMs: "cpu_ms", createdOn: "created_on", crossAccountGrant: "cross_account_grant", crossVersionCache: "cross_version_cache", databaseId: "database_id", defaultUsageModel: "default_usage_model", deletedClasses: "deleted_classes", deliveryDelay: "delivery_delay", destinationAddress: "destination_address", destinationConf: "destination_conf", dispatchNamespace: "dispatch_namespace", documentationUrl: "documentation_url", enableTimer: "enable_timer", entryPoint: "entry_point", environmentIsDefault: "environment_is_default", environmentName: "environment_name", errorMessage: "error_message", exchangeUrl: "exchange_url", expiresAt: "expires_at", fromScript: "from_script", greenCompute: "green_compute", hasAssets: "has_assets", hasModules: "has_modules", headSamplingRate: "head_sampling_rate", htmlHandling: "html_handling", indexName: "index_name", instanceName: "instance_name", invocationLogs: "invocation_logs", keepAssets: "keep_assets", keepBindings: "keep_bindings", keyBase64: "key_base64", keyJwk: "key_jwk", lastAnalyzedAt: "last_analyzed_at", lastComplete: "last_complete", lastDeployedFrom: "last_deployed_from", lastError: "last_error", mainModule: "main_module", migrationTag: "migration_tag", minimalMode: "minimal_mode", mitigationTimeout: "mitigation_timeout", modifiedOn: "modified_on", namedHandlers: "named_handlers", namespaceId: "namespace_id", networkId: "network_id", newClasses: "new_classes", newSqliteClasses: "new_sqlite_classes", newTag: "new_tag", notFoundHandling: "not_found_handling", oldName: "old_name", oldTag: "old_tag", perPage: "per_page", placementMode: "placement_mode", placementStatus: "placement_status", previewToken: "preview_token", previewsEnabled: "previews_enabled", propagationPolicy: "propagation_policy", queueName: "queue_name", renamedClasses: "renamed_classes", resultInfo: "result_info", rowsRead: "rows_read", runWorkerFirst: "run_worker_first", scriptName: "script_name", scriptRuntime: "script_runtime", secretName: "secret_name", serveDirectly: "serve_directly", serviceId: "service_id", serviceName: "service_name", startupTimeMs: "startup_time_ms", storeId: "store_id", streamingTailConsumers: "streaming_tail_consumers", tailConsumers: "tail_consumers", tailUrl: "tail_url", totalCount: "total_count", transferredClasses: "transferred_classes", tunnelId: "tunnel_id", usageModel: "usage_model", versionId: "version_id", versionTags: "version_tags", workersDev: "workers_dev", workflowName: "workflow_name", zoneId: "zone_id", zoneName: "zone_name", }), ), files: S.optional(S.Unknown.pipe(T.FormDataFile())), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", code: 200, contentType: "multipart", }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export const DispatchNamespacesScriptsUpdateResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export type DispatchNamespacesScriptsUpdateResponseCompatibilityFlagsList = Array; export const DispatchNamespacesScriptsUpdateResponseCompatibilityFlagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseHandlersList = Array; export const DispatchNamespacesScriptsUpdateResponseHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseNamedHandlersItemHandlersList = Array; export const DispatchNamespacesScriptsUpdateResponseNamedHandlersItemHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsUpdateResponseNamedHandlersItem { /** The names of handlers exported as part of the named export. */ handlers?: DispatchNamespacesScriptsUpdateResponseNamedHandlersItemHandlersList | null; /** The name of the export. */ name?: string | null; } export const DispatchNamespacesScriptsUpdateResponseNamedHandlersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ handlers: S.optional( S.NullOr( DispatchNamespacesScriptsUpdateResponseNamedHandlersItemHandlersList, ), ), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponseNamedHandlersItem", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseNamedHandlersList = Array; export const DispatchNamespacesScriptsUpdateResponseNamedHandlersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsUpdateResponseNamedHandlersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseObservabilityLogsDestinationsList = Array; export const DispatchNamespacesScriptsUpdateResponseObservabilityLogsDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsUpdateResponseObservabilityLogs { /** Whether logs are enabled for the Worker. */ enabled: boolean; /** Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. */ invocationLogs: boolean; /** A list of destinations where logs will be exported to. */ destinations?: DispatchNamespacesScriptsUpdateResponseObservabilityLogsDestinationsList | null; /** The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether log persistence is enabled for the Worker. */ persist?: boolean | null; } export const DispatchNamespacesScriptsUpdateResponseObservabilityLogs = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, invocationLogs: S.Boolean.pipe(T.Body("invocation_logs")), destinations: S.optional( S.NullOr( DispatchNamespacesScriptsUpdateResponseObservabilityLogsDestinationsList, ), ), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponseObservabilityLogs", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseObservabilityTracesDestinationsList = Array; export const DispatchNamespacesScriptsUpdateResponseObservabilityTracesDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseObservabilityTracesPropagationPolicy = | "authenticated" | "accept"; export const DispatchNamespacesScriptsUpdateResponseObservabilityTracesPropagationPolicy = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponseObservabilityTraces { /** A list of destinations where traces will be exported to. */ destinations?: DispatchNamespacesScriptsUpdateResponseObservabilityTracesDestinationsList | null; /** Whether traces are enabled for the Worker. */ enabled?: boolean | null; /** The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether trace persistence is enabled for the Worker. */ persist?: boolean | null; /** Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" (default) honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. */ propagationPolicy?: DispatchNamespacesScriptsUpdateResponseObservabilityTracesPropagationPolicy | null; } export const DispatchNamespacesScriptsUpdateResponseObservabilityTraces = /*@__PURE__*/ S.suspend(() => S.Struct({ destinations: S.optional( S.NullOr( DispatchNamespacesScriptsUpdateResponseObservabilityTracesDestinationsList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), propagationPolicy: S.optional( S.NullOr( DispatchNamespacesScriptsUpdateResponseObservabilityTracesPropagationPolicy, ).pipe(T.Body("propagation_policy")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponseObservabilityTraces", }) as any as S.Schema; export interface DispatchNamespacesScriptsUpdateResponseObservability { /** Whether observability is enabled for the Worker. */ enabled: boolean; /** The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Log settings for the Worker. */ logs?: DispatchNamespacesScriptsUpdateResponseObservabilityLogs | null; /** Trace settings for the Worker. */ traces?: DispatchNamespacesScriptsUpdateResponseObservabilityTraces | null; } export const DispatchNamespacesScriptsUpdateResponseObservability = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), logs: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseObservabilityLogs), ), traces: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseObservabilityTraces), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponseObservability", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase0Mode = "smart"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase0Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementCase0Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase0Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase0 { /** Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase0Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase0Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase0 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase0Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase0Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase0", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase1Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase1Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase1 { /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase1Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({ region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase1Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase1", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase2Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase2Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase2 { /** HTTP hostname for targeted placement. */ hostname: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase2Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase2 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase2Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase2", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase3Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase3Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase3 { /** TCP host and port for targeted placement. */ host: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase3Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase3 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase3Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase3", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase4Mode = "targeted"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase4Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementCase4Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase4Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase4 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase4Mode; /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase4Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase4Mode, region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase4Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase4", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase5Mode = "targeted"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase5Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementCase5Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase5Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase5 { /** HTTP hostname for targeted placement. */ hostname: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase5Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase5Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, mode: DispatchNamespacesScriptsUpdateResponsePlacementCase5Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase5Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase5", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase6Mode = "targeted"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase6Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementCase6Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase6Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase6 { /** TCP host and port for targeted placement. */ host: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase6Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase6Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase6 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, mode: DispatchNamespacesScriptsUpdateResponsePlacementCase6Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase6Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase6", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7Mode = "targeted"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItem = | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["region"], ["hostname"], ["host"]]), ); export type DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetList = Array; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetItem, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacementCase7Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementCase7Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsUpdateResponsePlacementCase7 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase7Mode; /** Array of placement targets (currently limited to single target). */ target: DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetList; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsUpdateResponsePlacementCase7Status | null; } export const DispatchNamespacesScriptsUpdateResponsePlacementCase7 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsUpdateResponsePlacementCase7Mode, target: DispatchNamespacesScriptsUpdateResponsePlacementCase7TargetList, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementCase7Status), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsUpdateResponsePlacementCase7", }) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponsePlacement = | DispatchNamespacesScriptsUpdateResponsePlacementCase0 | DispatchNamespacesScriptsUpdateResponsePlacementCase1 | DispatchNamespacesScriptsUpdateResponsePlacementCase2 | DispatchNamespacesScriptsUpdateResponsePlacementCase3 | DispatchNamespacesScriptsUpdateResponsePlacementCase4 | DispatchNamespacesScriptsUpdateResponsePlacementCase5 | DispatchNamespacesScriptsUpdateResponsePlacementCase6 | DispatchNamespacesScriptsUpdateResponsePlacementCase7; export const DispatchNamespacesScriptsUpdateResponsePlacement = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["mode", "lastAnalyzedAt", "status"], ["region", "lastAnalyzedAt", "status"], ["hostname", "lastAnalyzedAt", "status"], ["host", "lastAnalyzedAt", "status"], ["mode", "region", "lastAnalyzedAt", "status"], ["hostname", "mode", "lastAnalyzedAt", "status"], ["host", "mode", "lastAnalyzedAt", "status"], ["mode", "target", "lastAnalyzedAt", "status"], ]), ); export type DispatchNamespacesScriptsUpdateResponsePlacementMode = | "smart" | "targeted"; export const DispatchNamespacesScriptsUpdateResponsePlacementMode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponsePlacementStatus = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsUpdateResponsePlacementStatus = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsUpdateResponseTagsList = Array; export const DispatchNamespacesScriptsUpdateResponseTagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export const DispatchNamespacesScriptsUpdateResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export type DispatchNamespacesScriptsUpdateResponseTailConsumersList = Array; export const DispatchNamespacesScriptsUpdateResponseTailConsumersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptTailConsumersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsUpdateResponseUsageModel = | "standard" | "bundled" | "unbound"; export const DispatchNamespacesScriptsUpdateResponseUsageModel = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutDispatchNamespaceScriptResponse { startupTimeMs: number; /** The name used to identify the script. */ id?: string | null; /** Global CacheW configuration for the Worker. When caching is on, */ cacheOptions?: DispatchNamespacesScriptsGetResponseScriptCacheOptions | null; /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: string | null; /** 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`. */ compatibilityFlags?: DispatchNamespacesScriptsUpdateResponseCompatibilityFlagsList | null; /** When the script was created. */ createdOn?: string | null; /** The entry point for the script. */ entryPoint?: string | null; /** Hashed script content, can be used in a If-None-Match header when updating. */ etag?: string | null; /** The names of handlers exported as part of the default export. */ handlers?: DispatchNamespacesScriptsUpdateResponseHandlersList | null; /** Whether a Worker contains assets. */ hasAssets?: boolean | null; /** Whether a Worker contains modules. */ hasModules?: boolean | null; /** The client most recently used to deploy this Worker. */ lastDeployedFrom?: string | null; /** Whether Logpush is turned on for the Worker. */ logpush?: boolean | null; /** The tag of the Durable Object migration that was most recently applied for this Worker. */ migrationTag?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** Named exports, such as Durable Object class implementations and named entrypoints. */ namedHandlers?: DispatchNamespacesScriptsUpdateResponseNamedHandlersList | null; /** Observability settings for the Worker. */ observability?: DispatchNamespacesScriptsUpdateResponseObservability | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: DispatchNamespacesScriptsUpdateResponsePlacement | null; placementMode?: DispatchNamespacesScriptsUpdateResponsePlacementMode | null; placementStatus?: DispatchNamespacesScriptsUpdateResponsePlacementStatus | null; /** The immutable ID of the script. */ tag?: string | null; /** Tags associated with the Worker. */ tags?: DispatchNamespacesScriptsUpdateResponseTagsList | null; /** List of Workers that will consume logs from the attached Worker. */ tailConsumers?: DispatchNamespacesScriptsUpdateResponseTailConsumersList | null; /** Usage model for the Worker invocations. */ usageModel?: DispatchNamespacesScriptsUpdateResponseUsageModel | null; } export const PutDispatchNamespaceScriptResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ startupTimeMs: S.Number.pipe(T.Body("startup_time_ms")), id: S.optional(S.NullOr(S.String)), cacheOptions: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptCacheOptions).pipe( T.Body("cache_options"), ), ), compatibilityDate: S.optional( S.NullOr(S.String).pipe(T.Body("compatibility_date")), ), compatibilityFlags: S.optional( S.NullOr( DispatchNamespacesScriptsUpdateResponseCompatibilityFlagsList, ).pipe(T.Body("compatibility_flags")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), entryPoint: S.optional(S.NullOr(S.String).pipe(T.Body("entry_point"))), etag: S.optional(S.NullOr(S.String)), handlers: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseHandlersList), ), hasAssets: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_assets"))), hasModules: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_modules"))), lastDeployedFrom: S.optional( S.NullOr(S.String).pipe(T.Body("last_deployed_from")), ), logpush: S.optional(S.NullOr(S.Boolean)), migrationTag: S.optional(S.NullOr(S.String).pipe(T.Body("migration_tag"))), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namedHandlers: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseNamedHandlersList).pipe( T.Body("named_handlers"), ), ), observability: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseObservability), ), placement: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacement), ), placementMode: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementMode).pipe( T.Body("placement_mode"), ), ), placementStatus: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponsePlacementStatus).pipe( T.Body("placement_status"), ), ), tag: S.optional(S.NullOr(S.String)), tags: S.optional(S.NullOr(DispatchNamespacesScriptsUpdateResponseTagsList)), tailConsumers: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseTailConsumersList).pipe( T.Body("tail_consumers"), ), ), usageModel: S.optional( S.NullOr(DispatchNamespacesScriptsUpdateResponseUsageModel).pipe( T.Body("usage_model"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptResponse", }) as any as S.Schema; export interface PutDispatchNamespaceScriptContentRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; cfworkerbodypart?: string; cfworkermainmodulepart?: string; } export const PutDispatchNamespaceScriptContentRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), cfworkerbodypart: S.optional( S.String.pipe(T.Header("CF-WORKER-BODY-PART")), ), cfworkermainmodulepart: S.optional( S.String.pipe(T.Header("CF-WORKER-MAIN-MODULE-PART")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptContentRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export const DispatchNamespacesScriptsContentUpdateResponseCacheOptions = DispatchNamespacesScriptsGetResponseScriptCacheOptions; export type DispatchNamespacesScriptsContentUpdateResponseCompatibilityFlagsList = Array; export const DispatchNamespacesScriptsContentUpdateResponseCompatibilityFlagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseHandlersList = Array; export const DispatchNamespacesScriptsContentUpdateResponseHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItemHandlersList = Array; export const DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItemHandlersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItem { /** The names of handlers exported as part of the named export. */ handlers?: DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItemHandlersList | null; /** The name of the export. */ name?: string | null; } export const DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ handlers: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItemHandlersList, ), ), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItem", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseNamedHandlersList = Array; export const DispatchNamespacesScriptsContentUpdateResponseNamedHandlersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsContentUpdateResponseNamedHandlersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseObservabilityLogsDestinationsList = Array; export const DispatchNamespacesScriptsContentUpdateResponseObservabilityLogsDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DispatchNamespacesScriptsContentUpdateResponseObservabilityLogs { /** Whether logs are enabled for the Worker. */ enabled: boolean; /** Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. */ invocationLogs: boolean; /** A list of destinations where logs will be exported to. */ destinations?: DispatchNamespacesScriptsContentUpdateResponseObservabilityLogsDestinationsList | null; /** The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether log persistence is enabled for the Worker. */ persist?: boolean | null; } export const DispatchNamespacesScriptsContentUpdateResponseObservabilityLogs = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, invocationLogs: S.Boolean.pipe(T.Body("invocation_logs")), destinations: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseObservabilityLogsDestinationsList, ), ), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponseObservabilityLogs", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesDestinationsList = Array; export const DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesDestinationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesPropagationPolicy = | "authenticated" | "accept"; export const DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesPropagationPolicy = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponseObservabilityTraces { /** A list of destinations where traces will be exported to. */ destinations?: DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesDestinationsList | null; /** Whether traces are enabled for the Worker. */ enabled?: boolean | null; /** The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Whether trace persistence is enabled for the Worker. */ persist?: boolean | null; /** Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" (default) honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. */ propagationPolicy?: DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesPropagationPolicy | null; } export const DispatchNamespacesScriptsContentUpdateResponseObservabilityTraces = /*@__PURE__*/ S.suspend(() => S.Struct({ destinations: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesDestinationsList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), persist: S.optional(S.NullOr(S.Boolean)), propagationPolicy: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseObservabilityTracesPropagationPolicy, ).pipe(T.Body("propagation_policy")), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponseObservabilityTraces", }) as any as S.Schema; export interface DispatchNamespacesScriptsContentUpdateResponseObservability { /** Whether observability is enabled for the Worker. */ enabled: boolean; /** The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. */ headSamplingRate?: number | null; /** Log settings for the Worker. */ logs?: DispatchNamespacesScriptsContentUpdateResponseObservabilityLogs | null; /** Trace settings for the Worker. */ traces?: DispatchNamespacesScriptsContentUpdateResponseObservabilityTraces | null; } export const DispatchNamespacesScriptsContentUpdateResponseObservability = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, headSamplingRate: S.optional( S.NullOr(S.Number).pipe(T.Body("head_sampling_rate")), ), logs: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseObservabilityLogs, ), ), traces: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseObservabilityTraces, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponseObservability", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Mode = "smart"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase0 { /** Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase0 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase0Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase0", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase1Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase1Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase1 { /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase1Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({ region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase1Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase1", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase2Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase2Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase2 { /** HTTP hostname for targeted placement. */ hostname: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase2Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase2 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase2Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase2", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase3Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase3Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase3 { /** TCP host and port for targeted placement. */ host: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase3Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase3 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase3Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase3", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Mode = "targeted"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase4 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Mode; /** Cloud region for targeted placement in format 'provider:region'. */ region: string; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Mode, region: S.String, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase4Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase4", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Mode = "targeted"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase5 { /** HTTP hostname for targeted placement. */ hostname: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: S.String, mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase5Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase5", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Mode = "targeted"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase6 { /** TCP host and port for targeted placement. */ host: string; /** Targeted placement mode. */ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Mode; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase6 = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.String, mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Mode, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase6Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase6", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Mode = "targeted"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Mode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemRegion = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemHostname = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItemHost = DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItem = | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemRegion | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHostname | DispatchNamespacesScriptsGetResponseScriptPlacementCase7TargetItemHost; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["region"], ["hostname"], ["host"]]), ); export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetList = Array; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetItem, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Status = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Status = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsContentUpdateResponsePlacementCase7 { /** Targeted placement mode. */ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Mode; /** Array of placement targets (currently limited to single target). */ target: DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetList; /** The last time the script was analyzed for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ lastAnalyzedAt?: string | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ status?: DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Status | null; } export const DispatchNamespacesScriptsContentUpdateResponsePlacementCase7 = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Mode, target: DispatchNamespacesScriptsContentUpdateResponsePlacementCase7TargetList, lastAnalyzedAt: S.optional( S.NullOr(S.String).pipe(T.Body("last_analyzed_at")), ), status: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementCase7Status, ), ), }), ).annotate({ identifier: "DispatchNamespacesScriptsContentUpdateResponsePlacementCase7", }) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponsePlacement = | DispatchNamespacesScriptsContentUpdateResponsePlacementCase0 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase1 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase2 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase3 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase4 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase5 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase6 | DispatchNamespacesScriptsContentUpdateResponsePlacementCase7; export const DispatchNamespacesScriptsContentUpdateResponsePlacement = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["mode", "lastAnalyzedAt", "status"], ["region", "lastAnalyzedAt", "status"], ["hostname", "lastAnalyzedAt", "status"], ["host", "lastAnalyzedAt", "status"], ["mode", "region", "lastAnalyzedAt", "status"], ["hostname", "mode", "lastAnalyzedAt", "status"], ["host", "mode", "lastAnalyzedAt", "status"], ["mode", "target", "lastAnalyzedAt", "status"], ]), ); export type DispatchNamespacesScriptsContentUpdateResponsePlacementMode = | "smart" | "targeted"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementMode = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponsePlacementStatus = | "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"; export const DispatchNamespacesScriptsContentUpdateResponsePlacementStatus = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsContentUpdateResponseTagsList = Array; export const DispatchNamespacesScriptsContentUpdateResponseTagsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export const DispatchNamespacesScriptsContentUpdateResponseTailConsumersItem = DispatchNamespacesScriptsGetResponseScriptTailConsumersItem; export type DispatchNamespacesScriptsContentUpdateResponseTailConsumersList = Array; export const DispatchNamespacesScriptsContentUpdateResponseTailConsumersList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsGetResponseScriptTailConsumersItem, ) as any as S.Schema; export type DispatchNamespacesScriptsContentUpdateResponseUsageModel = | "standard" | "bundled" | "unbound"; export const DispatchNamespacesScriptsContentUpdateResponseUsageModel = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutDispatchNamespaceScriptContentResponse { /** The name used to identify the script. */ id?: string | null; /** Global CacheW configuration for the Worker. When caching is on, */ cacheOptions?: DispatchNamespacesScriptsGetResponseScriptCacheOptions | null; /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: string | null; /** 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`. */ compatibilityFlags?: DispatchNamespacesScriptsContentUpdateResponseCompatibilityFlagsList | null; /** When the script was created. */ createdOn?: string | null; /** Hashed script content, can be used in a If-None-Match header when updating. */ etag?: string | null; /** The names of handlers exported as part of the default export. */ handlers?: DispatchNamespacesScriptsContentUpdateResponseHandlersList | null; /** Whether a Worker contains assets. */ hasAssets?: boolean | null; /** Whether a Worker contains modules. */ hasModules?: boolean | null; /** The client most recently used to deploy this Worker. */ lastDeployedFrom?: string | null; /** Whether Logpush is turned on for the Worker. */ logpush?: boolean | null; /** The tag of the Durable Object migration that was most recently applied for this Worker. */ migrationTag?: string | null; /** When the script was last modified. */ modifiedOn?: string | null; /** Named exports, such as Durable Object class implementations and named entrypoints. */ namedHandlers?: DispatchNamespacesScriptsContentUpdateResponseNamedHandlersList | null; /** Observability settings for the Worker. */ observability?: DispatchNamespacesScriptsContentUpdateResponseObservability | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: DispatchNamespacesScriptsContentUpdateResponsePlacement | null; /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placementMode?: DispatchNamespacesScriptsContentUpdateResponsePlacementMode | null; /** Status of [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ placementStatus?: DispatchNamespacesScriptsContentUpdateResponsePlacementStatus | null; /** The immutable ID of the script. */ tag?: string | null; /** Tags associated with the Worker. */ tags?: DispatchNamespacesScriptsContentUpdateResponseTagsList | null; /** List of Workers that will consume logs from the attached Worker. */ tailConsumers?: DispatchNamespacesScriptsContentUpdateResponseTailConsumersList | null; /** Usage model for the Worker invocations. */ usageModel?: DispatchNamespacesScriptsContentUpdateResponseUsageModel | null; } export const PutDispatchNamespaceScriptContentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cacheOptions: S.optional( S.NullOr(DispatchNamespacesScriptsGetResponseScriptCacheOptions).pipe( T.Body("cache_options"), ), ), compatibilityDate: S.optional( S.NullOr(S.String).pipe(T.Body("compatibility_date")), ), compatibilityFlags: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseCompatibilityFlagsList, ).pipe(T.Body("compatibility_flags")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), etag: S.optional(S.NullOr(S.String)), handlers: S.optional( S.NullOr(DispatchNamespacesScriptsContentUpdateResponseHandlersList), ), hasAssets: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_assets"))), hasModules: S.optional(S.NullOr(S.Boolean).pipe(T.Body("has_modules"))), lastDeployedFrom: S.optional( S.NullOr(S.String).pipe(T.Body("last_deployed_from")), ), logpush: S.optional(S.NullOr(S.Boolean)), migrationTag: S.optional( S.NullOr(S.String).pipe(T.Body("migration_tag")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), namedHandlers: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseNamedHandlersList, ).pipe(T.Body("named_handlers")), ), observability: S.optional( S.NullOr(DispatchNamespacesScriptsContentUpdateResponseObservability), ), placement: S.optional( S.NullOr(DispatchNamespacesScriptsContentUpdateResponsePlacement), ), placementMode: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementMode, ).pipe(T.Body("placement_mode")), ), placementStatus: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponsePlacementStatus, ).pipe(T.Body("placement_status")), ), tag: S.optional(S.NullOr(S.String)), tags: S.optional( S.NullOr(DispatchNamespacesScriptsContentUpdateResponseTagsList), ), tailConsumers: S.optional( S.NullOr( DispatchNamespacesScriptsContentUpdateResponseTailConsumersList, ).pipe(T.Body("tail_consumers")), ), usageModel: S.optional( S.NullOr(DispatchNamespacesScriptsContentUpdateResponseUsageModel).pipe( T.Body("usage_model"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptContentResponse", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsUpdateRequestType = | "secret_text" | "secret_key"; export const DispatchNamespacesScriptsSecretsUpdateRequestType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateRequestFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsUpdateRequestFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateRequestUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsUpdateRequestUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateRequestUsagesList = Array< DispatchNamespacesScriptsSecretsUpdateRequestUsagesItem | (string & {}) >; export const DispatchNamespacesScriptsSecretsUpdateRequestUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsUpdateRequestUsagesItem, ) as any as S.Schema; export interface PutDispatchNamespaceScriptSecretRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text?: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsUpdateRequestType | (string & {}); /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm?: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format?: DispatchNamespacesScriptsSecretsUpdateRequestFormat | (string & {}); /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages?: DispatchNamespacesScriptsSecretsUpdateRequestUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown; } export const PutDispatchNamespaceScriptSecretRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), name: S.String, text: S.optional(S.String), type: DispatchNamespacesScriptsSecretsUpdateRequestType, algorithm: S.optional(S.Unknown), format: S.optional(DispatchNamespacesScriptsSecretsUpdateRequestFormat), usages: S.optional( DispatchNamespacesScriptsSecretsUpdateRequestUsagesList, ), keyBase64: S.optional(S.String.pipe(T.Body("key_base64"))), keyJwk: S.optional(S.Unknown.pipe(T.Body("key_jwk"))), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptSecretRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsUpdateResultSecretTextType = "secret_text"; export const DispatchNamespacesScriptsSecretsUpdateResultSecretTextType = /*@__PURE__*/ S.String; export interface DispatchNamespacesScriptsSecretsUpdateResultSecretText { /** A JavaScript variable name for the binding. */ name: string; /** The secret value to use. */ text: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsUpdateResultSecretTextType; } export const DispatchNamespacesScriptsSecretsUpdateResultSecretText = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, text: S.String, type: DispatchNamespacesScriptsSecretsUpdateResultSecretTextType, }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsUpdateResultSecretText", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsUpdateResultSecretKeyFormat = | "raw" | "pkcs8" | "spki" | "jwk"; export const DispatchNamespacesScriptsSecretsUpdateResultSecretKeyFormat = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateResultSecretKeyType = "secret_key"; export const DispatchNamespacesScriptsSecretsUpdateResultSecretKeyType = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesItem = | "encrypt" | "decrypt" | "sign" | "verify" | "deriveKey" | "deriveBits" | "wrapKey" | "unwrapKey"; export const DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesItem = /*@__PURE__*/ S.String; export type DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesList = Array; export const DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesList = /*@__PURE__*/ S.Array( DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesItem, ) as any as S.Schema; export interface DispatchNamespacesScriptsSecretsUpdateResultSecretKey { /** Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). */ algorithm: unknown; /** Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format). */ format: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyFormat; /** A JavaScript variable name for the binding. */ name: string; /** The kind of resource that the binding provides. */ type: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyType; /** Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages). */ usages: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesList; /** Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki". */ keyBase64?: string | null; /** Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". */ keyJwk?: unknown | null; } export const DispatchNamespacesScriptsSecretsUpdateResultSecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithm: S.Unknown, format: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyFormat, name: S.String, type: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyType, usages: DispatchNamespacesScriptsSecretsUpdateResultSecretKeyUsagesList, keyBase64: S.optional(S.NullOr(S.String).pipe(T.Body("key_base64"))), keyJwk: S.optional(S.NullOr(S.Unknown).pipe(T.Body("key_jwk"))), }), ).annotate({ identifier: "DispatchNamespacesScriptsSecretsUpdateResultSecretKey", }) as any as S.Schema; export type DispatchNamespacesScriptsSecretsUpdateResult = | DispatchNamespacesScriptsSecretsUpdateResultSecretText | DispatchNamespacesScriptsSecretsUpdateResultSecretKey; export const DispatchNamespacesScriptsSecretsUpdateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "text", "type"], ["algorithm", "format", "name", "type", "usages", "keyBase64", "keyJwk"], ]), ); export type PutDispatchNamespaceScriptSecretResponse = DispatchNamespacesScriptsSecretsUpdateResult; export const PutDispatchNamespaceScriptSecretResponse = /*@__PURE__*/ S.suspend( () => DispatchNamespacesScriptsSecretsUpdateResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "PutDispatchNamespaceScriptSecretResponse", }) as any as S.Schema; export type DispatchNamespacesScriptsTagsUpdateRequestBodyList = Array; export const DispatchNamespacesScriptsTagsUpdateRequestBodyList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PutDispatchNamespaceScriptTagRequest { /** Identifier. */ accountId: string; /** Name of the Workers for Platforms dispatch namespace. */ dispatchNamespace: string; /** Name of the script, used in URLs and route configuration. */ scriptName: string; /** Tags associated with the Worker. */ body: DispatchNamespacesScriptsTagsUpdateRequestBodyList; } export const PutDispatchNamespaceScriptTagRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), dispatchNamespace: S.String.pipe(T.Label("dispatch_namespace")), scriptName: S.String.pipe(T.Label("script_name")), body: DispatchNamespacesScriptsTagsUpdateRequestBodyList.pipe( T.HttpBody(), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptTagRequest", }) as any as S.Schema; export type DispatchNamespacesScriptsTagsUpdateResultList = Array; export const DispatchNamespacesScriptsTagsUpdateResultList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PutDispatchNamespaceScriptTagResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DispatchNamespacesScriptsTagsUpdateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const PutDispatchNamespaceScriptTagResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ result: DispatchNamespacesScriptsTagsUpdateResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutDispatchNamespaceScriptTagResponse", }) as any as S.Schema; export type BulkUpdateDispatchNamespaceScriptSecretsError = CloudflareOpError; /** Create, update, or delete multiple secrets on a script in a single operation using JSON Merge Patch (RFC 7396). Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to `null`. - Secrets not included in the request are left unchanged. */ export const bulkUpdateDispatchNamespaceScriptSecrets: API.OperationMethod< BulkUpdateDispatchNamespaceScriptSecretsRequest, BulkUpdateDispatchNamespaceScriptSecretsResponse, BulkUpdateDispatchNamespaceScriptSecretsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkUpdateDispatchNamespaceScriptSecretsRequest, output: BulkUpdateDispatchNamespaceScriptSecretsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateDispatchNamespaceError = | DispatchNamespaceAlreadyExists | Forbidden | CloudflareOpError; /** Create a new Workers for Platforms namespace. */ export const createDispatchNamespace: API.OperationMethod< CreateDispatchNamespaceRequest, CreateDispatchNamespaceResponse, CreateDispatchNamespaceError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateDispatchNamespaceRequest, output: CreateDispatchNamespaceResponse, errors: [ DispatchNamespaceAlreadyExists, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateDispatchNamespaceScriptAssetUploadError = CloudflareOpError; /** Start uploading a collection of assets for use in a Worker version. To learn more about the direct uploads of assets, see https://developers.cloudflare.com/workers/static-assets/direct-upload/. */ export const createDispatchNamespaceScriptAssetUpload: API.OperationMethod< CreateDispatchNamespaceScriptAssetUploadRequest, CreateDispatchNamespaceScriptAssetUploadResponse, CreateDispatchNamespaceScriptAssetUploadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateDispatchNamespaceScriptAssetUploadRequest, output: CreateDispatchNamespaceScriptAssetUploadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteDispatchNamespaceError = | DispatchNamespaceNotFound | Forbidden | CloudflareOpError; /** Delete a Workers for Platforms namespace. */ export const deleteDispatchNamespace: API.OperationMethod< DeleteDispatchNamespaceRequest, DeleteDispatchNamespaceResponse, DeleteDispatchNamespaceError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteDispatchNamespaceRequest, output: DeleteDispatchNamespaceResponse, errors: [ DispatchNamespaceNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteDispatchNamespaceScriptError = | DispatchNamespaceScriptNotFound | DispatchNamespaceNotFound | Forbidden | CloudflareOpError; /** Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete. */ export const deleteDispatchNamespaceScript: API.OperationMethod< DeleteDispatchNamespaceScriptRequest, DeleteDispatchNamespaceScriptResponse, DeleteDispatchNamespaceScriptError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteDispatchNamespaceScriptRequest, output: DeleteDispatchNamespaceScriptResponse, errors: [ DispatchNamespaceScriptNotFound, DispatchNamespaceNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteDispatchNamespaceScriptSecretError = CloudflareOpError; /** Remove a secret from a script uploaded to a Workers for Platforms namespace. */ export const deleteDispatchNamespaceScriptSecret: API.OperationMethod< DeleteDispatchNamespaceScriptSecretRequest, DeleteDispatchNamespaceScriptSecretResponse, DeleteDispatchNamespaceScriptSecretError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteDispatchNamespaceScriptSecretRequest, output: DeleteDispatchNamespaceScriptSecretResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteDispatchNamespaceScriptTagError = CloudflareOpError; /** Delete script tag for a script uploaded to a Workers for Platforms namespace. */ export const deleteDispatchNamespaceScriptTag: API.OperationMethod< DeleteDispatchNamespaceScriptTagRequest, DeleteDispatchNamespaceScriptTagResponse, DeleteDispatchNamespaceScriptTagError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteDispatchNamespaceScriptTagRequest, output: DeleteDispatchNamespaceScriptTagResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDispatchNamespaceError = | DispatchNamespaceNotFound | Forbidden | CloudflareOpError; /** Get a Workers for Platforms namespace. */ export const getDispatchNamespace: API.OperationMethod< GetDispatchNamespaceRequest, GetDispatchNamespaceResponse, GetDispatchNamespaceError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDispatchNamespaceRequest, output: GetDispatchNamespaceResponse, errors: [ DispatchNamespaceNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDispatchNamespaceScriptError = | DispatchNamespaceNotFound | DispatchNamespaceScriptNotFound | Forbidden | CloudflareOpError; /** Fetch information about a script uploaded to a Workers for Platforms namespace. */ export const getDispatchNamespaceScript: API.OperationMethod< GetDispatchNamespaceScriptRequest, GetDispatchNamespaceScriptResponse, GetDispatchNamespaceScriptError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDispatchNamespaceScriptRequest, output: GetDispatchNamespaceScriptResponse, errors: [ DispatchNamespaceNotFound, DispatchNamespaceScriptNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDispatchNamespaceScriptBindingError = CloudflareOpError; /** Fetch script bindings from a script uploaded to a Workers for Platforms namespace. */ export const getDispatchNamespaceScriptBinding: API.PaginatedOperationMethod< GetDispatchNamespaceScriptBindingRequest, GetDispatchNamespaceScriptBindingResponse, GetDispatchNamespaceScriptBindingError, CloudflareOpContext, DispatchNamespacesScriptsBindingsGetResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: GetDispatchNamespaceScriptBindingRequest, output: GetDispatchNamespaceScriptBindingResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type GetDispatchNamespaceScriptContentError = CloudflareOpError; /** Fetch script content from a script uploaded to a Workers for Platforms namespace. */ export const getDispatchNamespaceScriptContent: API.OperationMethod< GetDispatchNamespaceScriptContentRequest, GetDispatchNamespaceScriptContentResponse, GetDispatchNamespaceScriptContentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDispatchNamespaceScriptContentRequest, output: GetDispatchNamespaceScriptContentResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDispatchNamespaceScriptSecretError = CloudflareOpError; /** Get a given secret binding (value omitted) on a script uploaded to a Workers for Platforms namespace. */ export const getDispatchNamespaceScriptSecret: API.OperationMethod< GetDispatchNamespaceScriptSecretRequest, GetDispatchNamespaceScriptSecretResponse, GetDispatchNamespaceScriptSecretError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDispatchNamespaceScriptSecretRequest, output: GetDispatchNamespaceScriptSecretResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDispatchNamespaceScriptSettingError = | DispatchNamespaceNotFound | DispatchNamespaceScriptNotFound | Forbidden | CloudflareOpError; /** Get script settings from a script uploaded to a Workers for Platforms namespace. */ export const getDispatchNamespaceScriptSetting: API.OperationMethod< GetDispatchNamespaceScriptSettingRequest, GetDispatchNamespaceScriptSettingResponse, GetDispatchNamespaceScriptSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDispatchNamespaceScriptSettingRequest, output: GetDispatchNamespaceScriptSettingResponse, errors: [ DispatchNamespaceNotFound, DispatchNamespaceScriptNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListDispatchNamespacesError = CloudflareOpError; /** Fetch a list of Workers for Platforms namespaces. */ export const listDispatchNamespaces: API.PaginatedOperationMethod< ListDispatchNamespacesRequest, ListDispatchNamespacesResponse, ListDispatchNamespacesError, CloudflareOpContext, DispatchNamespacesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListDispatchNamespacesRequest, output: ListDispatchNamespacesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListDispatchNamespaceScriptSecretsError = CloudflareOpError; /** List secrets bound to a script uploaded to a Workers for Platforms namespace. */ export const listDispatchNamespaceScriptSecrets: API.PaginatedOperationMethod< ListDispatchNamespaceScriptSecretsRequest, ListDispatchNamespaceScriptSecretsResponse, ListDispatchNamespaceScriptSecretsError, CloudflareOpContext, DispatchNamespacesScriptsSecretsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListDispatchNamespaceScriptSecretsRequest, output: ListDispatchNamespaceScriptSecretsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListDispatchNamespaceScriptTagsError = CloudflareOpError; /** Fetch tags from a script uploaded to a Workers for Platforms namespace. */ export const listDispatchNamespaceScriptTags: API.PaginatedOperationMethod< ListDispatchNamespaceScriptTagsRequest, ListDispatchNamespaceScriptTagsResponse, ListDispatchNamespaceScriptTagsError, CloudflareOpContext, string > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListDispatchNamespaceScriptTagsRequest, output: ListDispatchNamespaceScriptTagsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchDispatchNamespaceScriptSettingError = CloudflareOpError; /** Patch script metadata, such as bindings. */ export const patchDispatchNamespaceScriptSetting: API.OperationMethod< PatchDispatchNamespaceScriptSettingRequest, PatchDispatchNamespaceScriptSettingResponse, PatchDispatchNamespaceScriptSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchDispatchNamespaceScriptSettingRequest, output: PatchDispatchNamespaceScriptSettingResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutDispatchNamespaceScriptError = | DispatchNamespaceNotFound | Forbidden | SecretsStoreBindingNotFound | KVNamespaceNotFound | R2BucketNotFound | D1DatabaseNotFound | QueueNotFound | ServiceBindingNotFound | DurableObjectClassNotFound | HyperdriveConfigNotFound | VectorizeIndexNotFound | MtlsCertificateNotFound | CloudflareOpError; /** Upload a worker module to a Workers for Platforms namespace. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/. */ export const putDispatchNamespaceScript: API.OperationMethod< PutDispatchNamespaceScriptRequest, PutDispatchNamespaceScriptResponse, PutDispatchNamespaceScriptError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutDispatchNamespaceScriptRequest, output: PutDispatchNamespaceScriptResponse, errors: [ DispatchNamespaceNotFound, Forbidden, SecretsStoreBindingNotFound, KVNamespaceNotFound, R2BucketNotFound, D1DatabaseNotFound, QueueNotFound, ServiceBindingNotFound, DurableObjectClassNotFound, HyperdriveConfigNotFound, VectorizeIndexNotFound, MtlsCertificateNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutDispatchNamespaceScriptContentError = CloudflareOpError; /** Put script content for a script uploaded to a Workers for Platforms namespace. */ export const putDispatchNamespaceScriptContent: API.OperationMethod< PutDispatchNamespaceScriptContentRequest, PutDispatchNamespaceScriptContentResponse, PutDispatchNamespaceScriptContentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutDispatchNamespaceScriptContentRequest, output: PutDispatchNamespaceScriptContentResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutDispatchNamespaceScriptSecretError = CloudflareOpError; /** Add a secret to a script uploaded to a Workers for Platforms namespace. */ export const putDispatchNamespaceScriptSecret: API.OperationMethod< PutDispatchNamespaceScriptSecretRequest, PutDispatchNamespaceScriptSecretResponse, PutDispatchNamespaceScriptSecretError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutDispatchNamespaceScriptSecretRequest, output: PutDispatchNamespaceScriptSecretResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutDispatchNamespaceScriptTagError = CloudflareOpError; /** Put script tags for a script uploaded to a Workers for Platforms namespace. */ export const putDispatchNamespaceScriptTag: API.PaginatedOperationMethod< PutDispatchNamespaceScriptTagRequest, PutDispatchNamespaceScriptTagResponse, PutDispatchNamespaceScriptTagError, CloudflareOpContext, string > = /*@__PURE__*/ API.makePaginated( () => ({ input: PutDispatchNamespaceScriptTagRequest, output: PutDispatchNamespaceScriptTagResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any;