// 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> = { creationDate: "creation_date", customMetadata: "custom_metadata", httpMetadata: "http_metadata", lastModified: "last_modified", perPage: "per_page", queueId: "queue", resultInfo: "result_info", storageClass: "storage_class", }; export class BucketAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BucketAlreadyExists", { code: S.Number, message: S.String, }), [{ code: 10004 }], ) {} export class BucketNotEmpty extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BucketNotEmpty", { code: S.Number, message: S.String, }), [{ status: 409, message: { includes: "is not empty" } }], ) {} export class BucketNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BucketNotFound", { code: S.Number, message: S.String, }), [{ code: 10085 }], ) {} export class CustomDomainInUse extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("CustomDomainInUse", { code: S.Number, message: S.String, }), [{ status: 409, message: { includes: "in use" } }], ) {} export class DomainNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("DomainNotFound", { code: S.Number, message: S.String, }), [{ code: 10053 }], ) {} export class EventNotificationConfigNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "EventNotificationConfigNotFound", { code: S.Number, message: S.String, }, ), [{ code: 11011 }], ) {} export class EventNotificationRuleConflict extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "EventNotificationRuleConflict", { code: S.Number, message: S.String, }, ), [{ code: 11020 }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class InvalidBucketName extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidBucketName", { code: S.Number, message: S.String, }), [{ code: 10005 }], ) {} export class InvalidEventNotificationConfig extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidEventNotificationConfig", { code: S.Number, message: S.String, }, ), [{ code: 11014 }, { code: 11019 }], ) {} export class InvalidRoute extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidRoute", { code: S.Number, message: S.String, }), [{ code: 7003 }], ) {} export class InvalidUpstreamCredentials extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidUpstreamCredentials", { code: S.Number, message: S.String, }, ), [{ code: 10063 }], ) {} export class NoCorsConfiguration extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NoCorsConfiguration", { code: S.Number, message: S.String, }), [{ code: 10059 }], ) {} export class NoEventNotificationConfig extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "NoEventNotificationConfig", { code: S.Number, message: S.String, }, ), [{ code: 11015 }], ) {} export class NoRoute extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NoRoute", { code: S.Number, message: S.String, }), [{ code: 10015 }], ) {} export class NoSuchBucket extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NoSuchBucket", { code: S.Number, message: S.String, }), [{ code: 10006 }], ) {} export class NoSuchKey extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NoSuchKey", { code: S.Number, message: S.String, }), [ { status: 404, message: { includes: "specified key does not exist" } }, { code: 10007 }, ], ) {} export class QueueNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("QueueNotFound", { code: S.Number, message: S.String, }), [{ code: 11000 }], ) {} export interface AbortAllSuperSlurperJobRequest { accountId: string; } export const AbortAllSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/jobs/abortAll", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "AbortAllSuperSlurperJobRequest", }) as any as S.Schema; export type AbortAllSuperSlurperJobResponse = string; export const AbortAllSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "AbortAllSuperSlurperJobResponse", }) as any as S.Schema; export interface AbortSuperSlurperJobRequest { accountId: string; jobId: string; } export const AbortSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/jobs/{job_id}/abort", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "AbortSuperSlurperJobRequest", }) as any as S.Schema; export type AbortSuperSlurperJobResponse = string; export const AbortSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "AbortSuperSlurperJobResponse", }) as any as S.Schema; export type BucketsCreateRequestLocationHint = | "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc"; export const BucketsCreateRequestLocationHint = /*@__PURE__*/ S.String; export type BucketsCreateRequestStorageClass = "Standard" | "InfrequentAccess"; export const BucketsCreateRequestStorageClass = /*@__PURE__*/ S.String; export type BucketsCreateRequestCfR2Jurisdiction = "default" | "eu" | "fedramp"; export const BucketsCreateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface CreateBucketRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ name: string; /** Location of the bucket. */ locationHint?: BucketsCreateRequestLocationHint | (string & {}); /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsCreateRequestStorageClass | (string & {}); /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsCreateRequestCfR2Jurisdiction | (string & {}); } export const CreateBucketRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, locationHint: S.optional(BucketsCreateRequestLocationHint), storageClass: S.optional(BucketsCreateRequestStorageClass), jurisdiction: S.optional( BucketsCreateRequestCfR2Jurisdiction.pipe(T.Header("cf-r2-jurisdiction")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/r2/buckets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateBucketRequest", }) as any as S.Schema; export type BucketsCreateResponseJurisdiction = "default" | "eu" | "fedramp"; export const BucketsCreateResponseJurisdiction = /*@__PURE__*/ S.String; export type BucketsCreateResponseLocation = | "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc"; export const BucketsCreateResponseLocation = /*@__PURE__*/ S.String; export type BucketsCreateResponseStorageClass = "Standard" | "InfrequentAccess"; export const BucketsCreateResponseStorageClass = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateBucketResponse { /** Creation timestamp. */ creationDate?: string | null; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsCreateResponseJurisdiction | null; /** Location of the bucket. */ location?: BucketsCreateResponseLocation | null; /** Name of the bucket. */ name?: string | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsCreateResponseStorageClass | null; } export const CreateBucketResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ creationDate: S.optional(S.NullOr(S.String).pipe(T.Body("creation_date"))), jurisdiction: S.optional(S.NullOr(BucketsCreateResponseJurisdiction)), location: S.optional(S.NullOr(BucketsCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), storageClass: S.optional( S.NullOr(BucketsCreateResponseStorageClass).pipe(T.Body("storage_class")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateBucketResponse", }) as any as S.Schema; export type BucketsDomainsCustomCreateRequestCiphersList = Array; export const BucketsDomainsCustomCreateRequestCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomCreateRequestMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomCreateRequestMinTLS = /*@__PURE__*/ S.String; export type BucketsDomainsCustomCreateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsCustomCreateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface CreateBucketDomainCustomRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Name of the custom domain to be added. */ domain: string; /** Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. */ enabled: boolean; /** Zone ID of the custom domain. */ zoneId: string; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomCreateRequestCiphersList; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */ minTLS?: BucketsDomainsCustomCreateRequestMinTLS | (string & {}); /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsCustomCreateRequestCfR2Jurisdiction | (string & {}); } export const CreateBucketDomainCustomRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), domain: S.String, enabled: S.Boolean, zoneId: S.String, ciphers: S.optional(BucketsDomainsCustomCreateRequestCiphersList), minTLS: S.optional(BucketsDomainsCustomCreateRequestMinTLS), jurisdiction: S.optional( BucketsDomainsCustomCreateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateBucketDomainCustomRequest", }) as any as S.Schema; export type BucketsDomainsCustomCreateResponseCiphersList = Array; export const BucketsDomainsCustomCreateResponseCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomCreateResponseMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomCreateResponseMinTLS = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateBucketDomainCustomResponse { /** Domain name of the affected custom domain. */ domain: string; /** Whether this bucket is publicly accessible at the specified custom domain. */ enabled: boolean; /** Zone ID of the custom domain. */ zoneId: string; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomCreateResponseCiphersList | null; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */ minTLS?: BucketsDomainsCustomCreateResponseMinTLS | null; } export const CreateBucketDomainCustomResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ domain: S.String, enabled: S.Boolean, zoneId: S.String, ciphers: S.optional( S.NullOr(BucketsDomainsCustomCreateResponseCiphersList), ), minTLS: S.optional(S.NullOr(BucketsDomainsCustomCreateResponseMinTLS)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateBucketDomainCustomResponse", }) as any as S.Schema; export interface SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret { accessKeyId: string; secretAccessKey: string; } export const SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.String, secretAccessKey: S.String, }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret", }) as any as S.Schema; export type SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaVendor = "s3"; export const SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaVendor = /*@__PURE__*/ S.String; export type SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaKeysList = Array; export const SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchema { bucket: string; secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; vendor: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaVendor; /** Custom S3-compatible endpoint that must use https://. */ endpoint?: string; keys?: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaKeysList; pathPrefix?: string; region?: string; } export const SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.String, secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret, vendor: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaVendor, endpoint: S.optional(S.String), keys: S.optional( SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaKeysList, ), pathPrefix: S.optional(S.String), region: S.optional(S.String), }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchema", }) as any as S.Schema; export interface SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret { clientEmail: string; privateKey: string; } export const SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret = /*@__PURE__*/ S.suspend(() => S.Struct({ clientEmail: S.String, privateKey: S.String, }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret", }) as any as S.Schema; export type SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaVendor = "gcs"; export const SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaVendor = /*@__PURE__*/ S.String; export type SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaKeysList = Array; export const SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchema { bucket: string; secret: SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret; vendor: SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaVendor; keys?: SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaKeysList; pathPrefix?: string; } export const SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.String, secret: SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret, vendor: SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaVendor, keys: S.optional( SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaKeysList, ), pathPrefix: S.optional(S.String), }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchema", }) as any as S.Schema; export type SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export const SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export type SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor = "r2"; export const SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor = /*@__PURE__*/ S.String; export type SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaJurisdiction = /*@__PURE__*/ S.String; export type SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaKeysList = Array; export const SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchema { bucket: string; secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; vendor: SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor; jurisdiction?: | SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaJurisdiction | (string & {}); keys?: SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaKeysList; pathPrefix?: string; } export const SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.String, secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret, vendor: SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor, jurisdiction: S.optional( SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaJurisdiction, ), keys: S.optional( SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaKeysList, ), pathPrefix: S.optional(S.String), }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchema", }) as any as S.Schema; export type SuperSlurperJobsCreateRequestSource = | SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchema | SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchema | SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchema; export const SuperSlurperJobsCreateRequestSource = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["bucket", "secret", "vendor", "endpoint", "keys", "pathPrefix", "region"], ["bucket", "secret", "vendor", "keys", "pathPrefix"], ["bucket", "secret", "vendor", "jurisdiction", "keys", "pathPrefix"], ]), ); export type SuperSlurperJobsCreateRequestTargetSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export const SuperSlurperJobsCreateRequestTargetSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export type SuperSlurperJobsCreateRequestTargetJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsCreateRequestTargetJurisdiction = /*@__PURE__*/ S.String; export interface SuperSlurperJobsCreateRequestTarget { bucket: string; secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; vendor: SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor; jurisdiction?: | SuperSlurperJobsCreateRequestTargetJurisdiction | (string & {}); } export const SuperSlurperJobsCreateRequestTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.String, secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret, vendor: SuperSlurperJobsCreateRequestSourceR2SlurperR2SourceSchemaVendor, jurisdiction: S.optional(SuperSlurperJobsCreateRequestTargetJurisdiction), }), ).annotate({ identifier: "SuperSlurperJobsCreateRequestTarget", }) as any as S.Schema; export interface CreateSuperSlurperJobRequest { accountId: string; overwrite?: boolean; source?: SuperSlurperJobsCreateRequestSource; target?: SuperSlurperJobsCreateRequestTarget; } export const CreateSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), overwrite: S.optional(S.Boolean), source: S.optional(SuperSlurperJobsCreateRequestSource), target: S.optional(SuperSlurperJobsCreateRequestTarget), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/slurper/jobs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSuperSlurperJobRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSuperSlurperJobResponse { id?: string | null; } export const CreateSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSuperSlurperJobResponse", }) as any as S.Schema; export type TemporaryCredentialsCreateRequestPermission = | "admin-read-write" | "admin-read-only" | "object-read-write" | "object-read-only"; export const TemporaryCredentialsCreateRequestPermission = /*@__PURE__*/ S.String; export type TemporaryCredentialsCreateRequestObjectsList = Array; export const TemporaryCredentialsCreateRequestObjectsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type TemporaryCredentialsCreateRequestPrefixesList = Array; export const TemporaryCredentialsCreateRequestPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateTemporaryCredentialRequest { /** Account ID. */ accountId: string; /** Name of the R2 bucket. */ bucket: string; /** The parent access key id to use for signing. */ parentAccessKeyId: string; /** Permissions allowed on the credentials. */ permission: TemporaryCredentialsCreateRequestPermission | (string & {}); /** How long the credentials will live for in seconds. */ ttlSeconds: number; /** Optional object paths to scope the credentials to. */ objects?: TemporaryCredentialsCreateRequestObjectsList; /** Optional prefix paths to scope the credentials to. */ prefixes?: TemporaryCredentialsCreateRequestPrefixesList; } export const CreateTemporaryCredentialRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucket: S.String, parentAccessKeyId: S.String, permission: TemporaryCredentialsCreateRequestPermission, ttlSeconds: S.Number, objects: S.optional(TemporaryCredentialsCreateRequestObjectsList), prefixes: S.optional(TemporaryCredentialsCreateRequestPrefixesList), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/r2/temp-access-credentials", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTemporaryCredentialRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateTemporaryCredentialResponse { /** ID for new access key. */ accessKeyId?: string | null; /** Secret access key. */ secretAccessKey?: string | null; /** Security token. */ sessionToken?: string | null; } export const CreateTemporaryCredentialResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.optional(S.NullOr(S.String)), secretAccessKey: S.optional(S.NullOr(S.String)), sessionToken: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTemporaryCredentialResponse", }) as any as S.Schema; export type BucketsDeleteRequestCfR2Jurisdiction = "default" | "eu" | "fedramp"; export const BucketsDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsDeleteRequestCfR2Jurisdiction | (string & {}); } export const DeleteBucketRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsDeleteRequestCfR2Jurisdiction.pipe(T.Header("cf-r2-jurisdiction")), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketRequest", }) as any as S.Schema; export type DeleteBucketResponse = unknown; export const DeleteBucketResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketResponse", }) as any as S.Schema; export type BucketsCorsDeleteRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsCorsDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketCorsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsCorsDeleteRequestCfR2Jurisdiction | (string & {}); } export const DeleteBucketCorsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsCorsDeleteRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/cors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketCorsRequest", }) as any as S.Schema; export type DeleteBucketCorsResponse = unknown; export const DeleteBucketCorsResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketCorsResponse", }) as any as S.Schema; export type BucketsDomainsCustomDeleteRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsCustomDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketDomainCustomRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Name of the custom domain. */ domain: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsCustomDeleteRequestCfR2Jurisdiction | (string & {}); } export const DeleteBucketDomainCustomRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), domain: S.String.pipe(T.Label()), jurisdiction: S.optional( BucketsDomainsCustomDeleteRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketDomainCustomRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteBucketDomainCustomResponse { /** Name of the removed custom domain. */ domain: string; } export const DeleteBucketDomainCustomResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ domain: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketDomainCustomResponse", }) as any as S.Schema; export type BucketsEventNotificationsDeleteRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsEventNotificationsDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketEventNotificationRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Queue ID. */ queueId: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsEventNotificationsDeleteRequestCfR2Jurisdiction | (string & {}); } export const DeleteBucketEventNotificationRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), queueId: S.String.pipe(T.Label("queue_id")), jurisdiction: S.optional( BucketsEventNotificationsDeleteRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketEventNotificationRequest", }) as any as S.Schema; export type DeleteBucketEventNotificationResponse = unknown; export const DeleteBucketEventNotificationResponse = /*@__PURE__*/ S.suspend( () => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketEventNotificationResponse", }) as any as S.Schema; export type BucketsObjectsDeleteRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsObjectsDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketObjectRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ cfR2Jurisdiction?: | BucketsObjectsDeleteRequestCfR2Jurisdiction | (string & {}); /** The key (name) of the object to delete. May contain slashes for path-like keys. */ objectName: string; } export const DeleteBucketObjectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), cfR2Jurisdiction: S.optional( BucketsObjectsDeleteRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), objectName: S.String.pipe(T.Label("object_name")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketObjectRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteBucketObjectResponse { /** The key (name) of the deleted object. */ key?: string | null; } export const DeleteBucketObjectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketObjectResponse", }) as any as S.Schema; export type BucketsSippyDeleteRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsSippyDeleteRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface DeleteBucketSippyRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsSippyDeleteRequestCfR2Jurisdiction | (string & {}); } export const DeleteBucketSippyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsSippyDeleteRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketSippyRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteBucketSippyResponse { enabled?: boolean | null; } export const DeleteBucketSippyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteBucketSippyResponse", }) as any as S.Schema; export type DeleteObjectsKeyList = Array; export const DeleteObjectsKeyList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DeleteObjectsRequest { /** Account ID. */ accountId: string; /** Name of the R2 bucket. */ bucketName: string; prefix?: string; body?: DeleteObjectsKeyList; cfR2Jurisdiction?: string; } export const DeleteObjectsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), prefix: S.optional(S.String.pipe(T.Query())), body: S.optional(DeleteObjectsKeyList.pipe(T.HttpBody())), cfR2Jurisdiction: S.optional(S.String.pipe(T.Header("cf-r2-jurisdiction"))), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/objects", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteObjectsRequest", }) as any as S.Schema; export type DeleteObjectsResponse = unknown; export const DeleteObjectsResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteObjectsResponse", }) as any as S.Schema; export type BucketsGetRequestCfR2Jurisdiction = "default" | "eu" | "fedramp"; export const BucketsGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsGetRequestCfR2Jurisdiction.pipe(T.Header("cf-r2-jurisdiction")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketRequest", }) as any as S.Schema; export type BucketsGetResponseJurisdiction = "default" | "eu" | "fedramp"; export const BucketsGetResponseJurisdiction = /*@__PURE__*/ S.String; export type BucketsGetResponseLocation = | "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc"; export const BucketsGetResponseLocation = /*@__PURE__*/ S.String; export type BucketsGetResponseStorageClass = "Standard" | "InfrequentAccess"; export const BucketsGetResponseStorageClass = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketResponse { /** Creation timestamp. */ creationDate?: string | null; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsGetResponseJurisdiction | null; /** Location of the bucket. */ location?: BucketsGetResponseLocation | null; /** Name of the bucket. */ name?: string | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsGetResponseStorageClass | null; } export const GetBucketResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ creationDate: S.optional(S.NullOr(S.String).pipe(T.Body("creation_date"))), jurisdiction: S.optional(S.NullOr(BucketsGetResponseJurisdiction)), location: S.optional(S.NullOr(BucketsGetResponseLocation)), name: S.optional(S.NullOr(S.String)), storageClass: S.optional( S.NullOr(BucketsGetResponseStorageClass).pipe(T.Body("storage_class")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketResponse", }) as any as S.Schema; export type BucketsCorsGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsCorsGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketCorsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsCorsGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketCorsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsCorsGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/cors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketCorsRequest", }) as any as S.Schema; export type BucketsCorsGetResponseRulesItemAllowedMethodsItem = | "GET" | "PUT" | "POST" | "DELETE" | "HEAD"; export const BucketsCorsGetResponseRulesItemAllowedMethodsItem = /*@__PURE__*/ S.String; export type BucketsCorsGetResponseRulesItemAllowedMethodsList = Array; export const BucketsCorsGetResponseRulesItemAllowedMethodsList = /*@__PURE__*/ S.Array( BucketsCorsGetResponseRulesItemAllowedMethodsItem, ) as any as S.Schema; export type BucketsCorsGetResponseRulesItemAllowedOriginsList = Array; export const BucketsCorsGetResponseRulesItemAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsCorsGetResponseRulesItemAllowedHeadersList = Array; export const BucketsCorsGetResponseRulesItemAllowedHeadersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BucketsCorsGetResponseRulesItemAllowed { /** Specifies the value for the Access-Control-Allow-Methods header R2 sets when requesting objects in a bucket from a browser. */ methods: BucketsCorsGetResponseRulesItemAllowedMethodsList; /** Specifies the value for the Access-Control-Allow-Origin header R2 sets when requesting objects in a bucket from a browser. */ origins: BucketsCorsGetResponseRulesItemAllowedOriginsList; /** Specifies the value for the Access-Control-Allow-Headers header R2 sets when requesting objects in this bucket from a browser. Cross-origin requests that include custom headers (e.g. x-user-id) should specify these headers as AllowedHeaders. */ headers?: BucketsCorsGetResponseRulesItemAllowedHeadersList | null; } export const BucketsCorsGetResponseRulesItemAllowed = /*@__PURE__*/ S.suspend( () => S.Struct({ methods: BucketsCorsGetResponseRulesItemAllowedMethodsList, origins: BucketsCorsGetResponseRulesItemAllowedOriginsList, headers: S.optional( S.NullOr(BucketsCorsGetResponseRulesItemAllowedHeadersList), ), }), ).annotate({ identifier: "BucketsCorsGetResponseRulesItemAllowed", }) as any as S.Schema; export type BucketsCorsGetResponseRulesItemExposeHeadersList = Array; export const BucketsCorsGetResponseRulesItemExposeHeadersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BucketsCorsGetResponseRulesItem { /** Object specifying allowed origins, methods and headers for this CORS rule. */ allowed: BucketsCorsGetResponseRulesItemAllowed; /** Identifier for this rule. */ id?: string | null; /** Specifies the headers that can be exposed back, and accessed by, the JavaScript making the cross-origin request. If you need to access headers beyond the safelisted response headers, such as Content-Encoding or cf-cache-status, you must specify it here. */ exposeHeaders?: BucketsCorsGetResponseRulesItemExposeHeadersList | null; /** Specifies the amount of time (in seconds) browsers are allowed to cache CORS preflight responses. Browsers may limit this to 2 hours or less, even if the maximum value (86400) is specified. */ maxAgeSeconds?: number | null; } export const BucketsCorsGetResponseRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ allowed: BucketsCorsGetResponseRulesItemAllowed, id: S.optional(S.NullOr(S.String)), exposeHeaders: S.optional( S.NullOr(BucketsCorsGetResponseRulesItemExposeHeadersList), ), maxAgeSeconds: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "BucketsCorsGetResponseRulesItem", }) as any as S.Schema; export type BucketsCorsGetResponseRulesList = Array; export const BucketsCorsGetResponseRulesList = /*@__PURE__*/ S.Array( BucketsCorsGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketCorsResponse { rules?: BucketsCorsGetResponseRulesList | null; } export const GetBucketCorsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ rules: S.optional(S.NullOr(BucketsCorsGetResponseRulesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketCorsResponse", }) as any as S.Schema; export type BucketsDomainsCustomGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsCustomGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketDomainCustomRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Name of the custom domain. */ domain: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsDomainsCustomGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketDomainCustomRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), domain: S.String.pipe(T.Label()), jurisdiction: S.optional( BucketsDomainsCustomGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketDomainCustomRequest", }) as any as S.Schema; export type BucketsDomainsCustomGetResponseStatusOwnership = | "pending" | "active" | "deactivated" | "blocked" | "error" | "unknown"; export const BucketsDomainsCustomGetResponseStatusOwnership = /*@__PURE__*/ S.String; export type BucketsDomainsCustomGetResponseStatusSsl = | "initializing" | "pending" | "active" | "deactivated" | "error" | "unknown"; export const BucketsDomainsCustomGetResponseStatusSsl = /*@__PURE__*/ S.String; export interface BucketsDomainsCustomGetResponseStatus { /** Ownership status of the domain. */ ownership: BucketsDomainsCustomGetResponseStatusOwnership; /** SSL certificate status. */ ssl: BucketsDomainsCustomGetResponseStatusSsl; } export const BucketsDomainsCustomGetResponseStatus = /*@__PURE__*/ S.suspend( () => S.Struct({ ownership: BucketsDomainsCustomGetResponseStatusOwnership, ssl: BucketsDomainsCustomGetResponseStatusSsl, }), ).annotate({ identifier: "BucketsDomainsCustomGetResponseStatus", }) as any as S.Schema; export type BucketsDomainsCustomGetResponseCiphersList = Array; export const BucketsDomainsCustomGetResponseCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomGetResponseMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomGetResponseMinTLS = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketDomainCustomResponse { /** Domain name of the custom domain to be added. */ domain: string; /** Whether this bucket is publicly accessible at the specified custom domain. */ enabled: boolean; status: BucketsDomainsCustomGetResponseStatus; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomGetResponseCiphersList | null; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */ minTLS?: BucketsDomainsCustomGetResponseMinTLS | null; /** Zone ID of the custom domain resides in. */ zoneId?: string | null; /** Zone that the custom domain resides in. */ zoneName?: string | null; } export const GetBucketDomainCustomResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ domain: S.String, enabled: S.Boolean, status: BucketsDomainsCustomGetResponseStatus, ciphers: S.optional(S.NullOr(BucketsDomainsCustomGetResponseCiphersList)), minTLS: S.optional(S.NullOr(BucketsDomainsCustomGetResponseMinTLS)), zoneId: S.optional(S.NullOr(S.String)), zoneName: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketDomainCustomResponse", }) as any as S.Schema; export type BucketsEventNotificationsGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsEventNotificationsGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketEventNotificationRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Queue ID. */ queueId: string; /** The bucket jurisdiction. */ jurisdiction?: | BucketsEventNotificationsGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketEventNotificationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), queueId: S.String.pipe(T.Label("queue_id")), jurisdiction: S.optional( BucketsEventNotificationsGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketEventNotificationRequest", }) as any as S.Schema; export type BucketsEventNotificationsGetResponseRulesItemActionsItem = | "PutObject" | "CopyObject" | "DeleteObject" | "CompleteMultipartUpload" | "LifecycleDeletion"; export const BucketsEventNotificationsGetResponseRulesItemActionsItem = /*@__PURE__*/ S.String; export type BucketsEventNotificationsGetResponseRulesItemActionsList = Array; export const BucketsEventNotificationsGetResponseRulesItemActionsList = /*@__PURE__*/ S.Array( BucketsEventNotificationsGetResponseRulesItemActionsItem, ) as any as S.Schema; export interface BucketsEventNotificationsGetResponseRulesItem { /** Array of R2 object actions that will trigger notifications. */ actions: BucketsEventNotificationsGetResponseRulesItemActionsList; /** Timestamp when the rule was created. */ createdAt?: string | null; /** A description that can be used to identify the event notification rule after creation. */ description?: string | null; /** Notifications will be sent only for objects with this prefix. */ prefix?: string | null; /** Rule ID. */ ruleId?: string | null; /** Notifications will be sent only for objects with this suffix. */ suffix?: string | null; } export const BucketsEventNotificationsGetResponseRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ actions: BucketsEventNotificationsGetResponseRulesItemActionsList, createdAt: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), prefix: S.optional(S.NullOr(S.String)), ruleId: S.optional(S.NullOr(S.String)), suffix: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsEventNotificationsGetResponseRulesItem", }) as any as S.Schema; export type BucketsEventNotificationsGetResponseRulesList = Array; export const BucketsEventNotificationsGetResponseRulesList = /*@__PURE__*/ S.Array( BucketsEventNotificationsGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketEventNotificationResponse { /** Queue ID. */ queueId?: string | null; /** Name of the queue. */ queueName?: string | null; rules?: BucketsEventNotificationsGetResponseRulesList | null; } export const GetBucketEventNotificationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ queueId: S.optional(S.NullOr(S.String)), queueName: S.optional(S.NullOr(S.String)), rules: S.optional(S.NullOr(BucketsEventNotificationsGetResponseRulesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketEventNotificationResponse", }) as any as S.Schema; export type BucketsLifecycleGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsLifecycleGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketLifecycleRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsLifecycleGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketLifecycleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsLifecycleGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketLifecycleRequest", }) as any as S.Schema; export interface BucketsLifecycleGetResponseRulesItemConditions { /** Transitions will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads. */ prefix: string; } export const BucketsLifecycleGetResponseRulesItemConditions = /*@__PURE__*/ S.suspend(() => S.Struct({ prefix: S.String, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemConditions", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionConditionType = "Age"; export const BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionCondition { maxAge: number; type: BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionConditionType; } export const BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionConditionType, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionCondition", }) as any as S.Schema; export interface BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransition { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition?: BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionCondition | null; } export const BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransition = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: S.optional( S.NullOr( BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransitionCondition, ), ), }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"; export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition { maxAge: number; type: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType; } export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"; export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition { date: string; type: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType; } export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionCondition = | BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition | BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition; export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["maxAge", "type"], ["date", "type"], ]), ); export interface BucketsLifecycleGetResponseRulesItemDeleteObjectsTransition { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition?: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionCondition | null; } export const BucketsLifecycleGetResponseRulesItemDeleteObjectsTransition = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: S.optional( S.NullOr( BucketsLifecycleGetResponseRulesItemDeleteObjectsTransitionCondition, ), ), }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemDeleteObjectsTransition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType = "Age"; export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition { maxAge: number; type: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType; } export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType = "Date"; export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition { date: string; type: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType; } export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemCondition = | BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition | BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition; export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["maxAge", "type"], ["date", "type"], ]), ); export type BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemStorageClass = "InfrequentAccess"; export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemStorageClass = /*@__PURE__*/ S.String; export interface BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItem { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemCondition; storageClass: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemStorageClass; } export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemCondition, storageClass: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItemStorageClass, }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItem", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesItemStorageClassTransitionsList = Array; export const BucketsLifecycleGetResponseRulesItemStorageClassTransitionsList = /*@__PURE__*/ S.Array( BucketsLifecycleGetResponseRulesItemStorageClassTransitionsItem, ) as any as S.Schema; export interface BucketsLifecycleGetResponseRulesItem { /** Unique identifier for this rule. */ id: string; /** Conditions that apply to all transitions of this rule. */ conditions: BucketsLifecycleGetResponseRulesItemConditions; /** Whether or not this rule is in effect. */ enabled: boolean; /** Transition to abort ongoing multipart uploads. */ abortMultipartUploadsTransition?: BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransition | null; /** Transition to delete objects. */ deleteObjectsTransition?: BucketsLifecycleGetResponseRulesItemDeleteObjectsTransition | null; /** Transitions to change the storage class of objects. */ storageClassTransitions?: BucketsLifecycleGetResponseRulesItemStorageClassTransitionsList | null; } export const BucketsLifecycleGetResponseRulesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, conditions: BucketsLifecycleGetResponseRulesItemConditions, enabled: S.Boolean, abortMultipartUploadsTransition: S.optional( S.NullOr( BucketsLifecycleGetResponseRulesItemAbortMultipartUploadsTransition, ), ), deleteObjectsTransition: S.optional( S.NullOr(BucketsLifecycleGetResponseRulesItemDeleteObjectsTransition), ), storageClassTransitions: S.optional( S.NullOr( BucketsLifecycleGetResponseRulesItemStorageClassTransitionsList, ), ), }), ).annotate({ identifier: "BucketsLifecycleGetResponseRulesItem", }) as any as S.Schema; export type BucketsLifecycleGetResponseRulesList = Array; export const BucketsLifecycleGetResponseRulesList = /*@__PURE__*/ S.Array( BucketsLifecycleGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketLifecycleResponse { rules?: BucketsLifecycleGetResponseRulesList | null; } export const GetBucketLifecycleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ rules: S.optional(S.NullOr(BucketsLifecycleGetResponseRulesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketLifecycleResponse", }) as any as S.Schema; export type BucketsLocksGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsLocksGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketLockRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsLocksGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketLockRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsLocksGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/lock", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketLockRequest", }) as any as S.Schema; export type BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeConditionType = "Age"; export const BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeCondition { maxAgeSeconds: number; type: BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeConditionType; } export const BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAgeSeconds: S.Number, type: BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeConditionType, }), ).annotate({ identifier: "BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeCondition", }) as any as S.Schema; export type BucketsLocksGetResponseRulesItemConditionR2LockRuleDateConditionType = "Date"; export const BucketsLocksGetResponseRulesItemConditionR2LockRuleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksGetResponseRulesItemConditionR2LockRuleDateCondition { date: string; type: BucketsLocksGetResponseRulesItemConditionR2LockRuleDateConditionType; } export const BucketsLocksGetResponseRulesItemConditionR2LockRuleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLocksGetResponseRulesItemConditionR2LockRuleDateConditionType, }), ).annotate({ identifier: "BucketsLocksGetResponseRulesItemConditionR2LockRuleDateCondition", }) as any as S.Schema; export type BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteConditionType = "Indefinite"; export const BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteCondition { type: BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteConditionType; } export const BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ type: BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteConditionType, }), ).annotate({ identifier: "BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteCondition", }) as any as S.Schema; export type BucketsLocksGetResponseRulesItemCondition = | BucketsLocksGetResponseRulesItemConditionR2LockRuleAgeCondition | BucketsLocksGetResponseRulesItemConditionR2LockRuleDateCondition | BucketsLocksGetResponseRulesItemConditionR2LockRuleIndefiniteCondition; export const BucketsLocksGetResponseRulesItemCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["maxAgeSeconds", "type"], ["date", "type"], ["type"]]), ); export interface BucketsLocksGetResponseRulesItem { /** Unique identifier for this rule. */ id: string; /** Condition to apply a lock rule to an object for how long in seconds. */ condition: BucketsLocksGetResponseRulesItemCondition; /** Whether or not this rule is in effect. */ enabled: boolean; /** Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads. */ prefix?: string | null; } export const BucketsLocksGetResponseRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, condition: BucketsLocksGetResponseRulesItemCondition, enabled: S.Boolean, prefix: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsLocksGetResponseRulesItem", }) as any as S.Schema; export type BucketsLocksGetResponseRulesList = Array; export const BucketsLocksGetResponseRulesList = /*@__PURE__*/ S.Array( BucketsLocksGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketLockResponse { rules?: BucketsLocksGetResponseRulesList | null; } export const GetBucketLockResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ rules: S.optional(S.NullOr(BucketsLocksGetResponseRulesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketLockResponse", }) as any as S.Schema; export type BucketsObjectsGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsObjectsGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketObjectRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ cfR2Jurisdiction?: BucketsObjectsGetRequestCfR2Jurisdiction | (string & {}); /** Returns the object only if it has been modified since the specified time. */ ifModifiedSince?: string; /** Returns the object only if its ETag does not match the given value. */ ifNoneMatch?: string; /** The key (name) of the object to retrieve. May contain slashes for path-like keys. */ objectName: string; } export const GetBucketObjectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), cfR2Jurisdiction: S.optional( BucketsObjectsGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), ifModifiedSince: S.optional(S.String.pipe(T.Header("If-Modified-Since"))), ifNoneMatch: S.optional(S.String.pipe(T.Header("If-None-Match"))), objectName: S.String.pipe(T.Label("object_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketObjectRequest", }) as any as S.Schema; export type GetBucketObjectResponseCfR2StorageClass = | "Standard" | "InfrequentAccess"; export const GetBucketObjectResponseCfR2StorageClass = /*@__PURE__*/ S.String; export interface GetBucketObjectResponse { /** Raw object body as an Effect Stream. */ body: T.BinaryResponseBody; /** Entity tag of the object (raw hex digest). */ etag?: string; /** MIME type of the object. */ contentType?: string; /** Object size in bytes. */ contentLength?: number; /** Content encoding of the object (e.g. `gzip`). */ contentEncoding?: string; /** Content disposition header for the object. */ contentDisposition?: string; /** Content language of the object. */ contentLanguage?: string; /** Byte range returned (set when the request used `Range`). */ contentRange?: string; /** Cache-Control directives associated with the object. */ cacheControl?: string; /** Expiration date of the object. */ expires?: string; /** When the object was last modified (RFC 7231 date). */ lastModified?: string; /** Storage class of the object (`Standard` or `InfrequentAccess`). */ cfR2StorageClass?: GetBucketObjectResponseCfR2StorageClass; } export const GetBucketObjectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ body: S.Unknown.pipe(T.BinaryResponseBody()), etag: S.optional(S.String.pipe(T.Header())), contentType: S.optional(S.String.pipe(T.Header("content-type"))), contentLength: S.optional(S.Number.pipe(T.Header("content-length"))), contentEncoding: S.optional(S.String.pipe(T.Header("content-encoding"))), contentDisposition: S.optional( S.String.pipe(T.Header("content-disposition")), ), contentLanguage: S.optional(S.String.pipe(T.Header("content-language"))), contentRange: S.optional(S.String.pipe(T.Header("content-range"))), cacheControl: S.optional(S.String.pipe(T.Header("cache-control"))), expires: S.optional(S.String.pipe(T.Header())), lastModified: S.optional(S.String.pipe(T.Header("last-modified"))), cfR2StorageClass: S.optional( GetBucketObjectResponseCfR2StorageClass.pipe( T.Header("cf-r2-storage-class"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketObjectResponse", }) as any as S.Schema; export type BucketsSippyGetRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsSippyGetRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface GetBucketSippyRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsSippyGetRequestCfR2Jurisdiction | (string & {}); } export const GetBucketSippyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsSippyGetRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketSippyRequest", }) as any as S.Schema; export type BucketsSippyGetResponseDestinationProvider = "r2"; export const BucketsSippyGetResponseDestinationProvider = /*@__PURE__*/ S.String; export interface BucketsSippyGetResponseDestination { /** ID of the Cloudflare API token used when writing objects to this */ accessKeyId?: string | null; account?: string | null; /** Name of the bucket on the provider. */ bucket?: string | null; provider?: BucketsSippyGetResponseDestinationProvider | null; } export const BucketsSippyGetResponseDestination = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.optional(S.NullOr(S.String)), account: S.optional(S.NullOr(S.String)), bucket: S.optional(S.NullOr(S.String)), provider: S.optional(S.NullOr(BucketsSippyGetResponseDestinationProvider)), }), ).annotate({ identifier: "BucketsSippyGetResponseDestination", }) as any as S.Schema; export type BucketsSippyGetResponseSourceProvider = "aws" | "gcs" | "s3"; export const BucketsSippyGetResponseSourceProvider = /*@__PURE__*/ S.String; export interface BucketsSippyGetResponseSource { /** Name of the bucket on the provider (AWS, GCS only). */ bucket?: string | null; /** S3-compatible URL (Generic S3-compatible providers only). */ bucketUrl?: string | null; provider?: BucketsSippyGetResponseSourceProvider | null; /** Region where the bucket resides (AWS only). */ region?: string | null; } export const BucketsSippyGetResponseSource = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), bucketUrl: S.optional(S.NullOr(S.String)), provider: S.optional(S.NullOr(BucketsSippyGetResponseSourceProvider)), region: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsSippyGetResponseSource", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetBucketSippyResponse { /** Details about the configured destination bucket. */ destination?: BucketsSippyGetResponseDestination | null; /** State of Sippy for this bucket. */ enabled?: boolean | null; /** Details about the configured source bucket. */ source?: BucketsSippyGetResponseSource | null; } export const GetBucketSippyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: S.optional(S.NullOr(BucketsSippyGetResponseDestination)), enabled: S.optional(S.NullOr(S.Boolean)), source: S.optional(S.NullOr(BucketsSippyGetResponseSource)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBucketSippyResponse", }) as any as S.Schema; export interface GetSuperSlurperJobRequest { accountId: string; jobId: string; } export const GetSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/slurper/jobs/{job_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSuperSlurperJobRequest", }) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaKeysList = Array; export const SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaVendor = "s3"; export const SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsGetResponseSourceS3SourceResponseSchema { bucket?: string | null; endpoint?: string | null; keys?: SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaVendor | null; } export const SuperSlurperJobsGetResponseSourceS3SourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), endpoint: S.optional(S.NullOr(S.String)), keys: S.optional( S.NullOr( SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr(SuperSlurperJobsGetResponseSourceS3SourceResponseSchemaVendor), ), }), ).annotate({ identifier: "SuperSlurperJobsGetResponseSourceS3SourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaKeysList = Array; export const SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaVendor = "gcs"; export const SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsGetResponseSourceGcsSourceResponseSchema { bucket?: string | null; keys?: SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaVendor | null; } export const SuperSlurperJobsGetResponseSourceGcsSourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), keys: S.optional( S.NullOr( SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr( SuperSlurperJobsGetResponseSourceGcsSourceResponseSchemaVendor, ), ), }), ).annotate({ identifier: "SuperSlurperJobsGetResponseSourceGcsSourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaJurisdiction = /*@__PURE__*/ S.String; export type SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaKeysList = Array; export const SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor = "r2"; export const SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsGetResponseSourceR2SourceResponseSchema { bucket?: string | null; jurisdiction?: SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaJurisdiction | null; keys?: SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor | null; } export const SuperSlurperJobsGetResponseSourceR2SourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), jurisdiction: S.optional( S.NullOr( SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaJurisdiction, ), ), keys: S.optional( S.NullOr( SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr(SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor), ), }), ).annotate({ identifier: "SuperSlurperJobsGetResponseSourceR2SourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsGetResponseSource = | SuperSlurperJobsGetResponseSourceS3SourceResponseSchema | SuperSlurperJobsGetResponseSourceGcsSourceResponseSchema | SuperSlurperJobsGetResponseSourceR2SourceResponseSchema; export const SuperSlurperJobsGetResponseSource = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["bucket", "endpoint", "keys", "pathPrefix", "vendor"], ["bucket", "keys", "pathPrefix", "vendor"], ["bucket", "jurisdiction", "keys", "pathPrefix", "vendor"], ]), ); export type SuperSlurperJobsGetResponseStatus = | "running" | "paused" | "aborted" | "completed"; export const SuperSlurperJobsGetResponseStatus = /*@__PURE__*/ S.String; export type SuperSlurperJobsGetResponseTargetJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsGetResponseTargetJurisdiction = /*@__PURE__*/ S.String; export interface SuperSlurperJobsGetResponseTarget { bucket?: string | null; jurisdiction?: SuperSlurperJobsGetResponseTargetJurisdiction | null; vendor?: SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor | null; } export const SuperSlurperJobsGetResponseTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), jurisdiction: S.optional( S.NullOr(SuperSlurperJobsGetResponseTargetJurisdiction), ), vendor: S.optional( S.NullOr(SuperSlurperJobsGetResponseSourceR2SourceResponseSchemaVendor), ), }), ).annotate({ identifier: "SuperSlurperJobsGetResponseTarget", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSuperSlurperJobResponse { id?: string | null; createdAt?: string | null; finishedAt?: string | null; overwrite?: boolean | null; source?: SuperSlurperJobsGetResponseSource | null; status?: SuperSlurperJobsGetResponseStatus | null; target?: SuperSlurperJobsGetResponseTarget | null; } export const GetSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String)), finishedAt: S.optional(S.NullOr(S.String)), overwrite: S.optional(S.NullOr(S.Boolean)), source: S.optional(S.NullOr(SuperSlurperJobsGetResponseSource)), status: S.optional(S.NullOr(SuperSlurperJobsGetResponseStatus)), target: S.optional(S.NullOr(SuperSlurperJobsGetResponseTarget)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSuperSlurperJobResponse", }) as any as S.Schema; export type BucketsDomainsCustomListRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsCustomListRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface ListBucketDomainCustomsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsCustomListRequestCfR2Jurisdiction | (string & {}); } export const ListBucketDomainCustomsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsDomainsCustomListRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketDomainCustomsRequest", }) as any as S.Schema; export type BucketsDomainsCustomListResponseDomainsItemStatusOwnership = | "pending" | "active" | "deactivated" | "blocked" | "error" | "unknown"; export const BucketsDomainsCustomListResponseDomainsItemStatusOwnership = /*@__PURE__*/ S.String; export type BucketsDomainsCustomListResponseDomainsItemStatusSsl = | "initializing" | "pending" | "active" | "deactivated" | "error" | "unknown"; export const BucketsDomainsCustomListResponseDomainsItemStatusSsl = /*@__PURE__*/ S.String; export interface BucketsDomainsCustomListResponseDomainsItemStatus { /** Ownership status of the domain. */ ownership: BucketsDomainsCustomListResponseDomainsItemStatusOwnership; /** SSL certificate status. */ ssl: BucketsDomainsCustomListResponseDomainsItemStatusSsl; } export const BucketsDomainsCustomListResponseDomainsItemStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ ownership: BucketsDomainsCustomListResponseDomainsItemStatusOwnership, ssl: BucketsDomainsCustomListResponseDomainsItemStatusSsl, }), ).annotate({ identifier: "BucketsDomainsCustomListResponseDomainsItemStatus", }) as any as S.Schema; export type BucketsDomainsCustomListResponseDomainsItemCiphersList = Array; export const BucketsDomainsCustomListResponseDomainsItemCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomListResponseDomainsItemMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomListResponseDomainsItemMinTLS = /*@__PURE__*/ S.String; export interface BucketsDomainsCustomListResponseDomainsItem { /** Domain name of the custom domain to be added. */ domain: string; /** Whether this bucket is publicly accessible at the specified custom domain. */ enabled: boolean; status: BucketsDomainsCustomListResponseDomainsItemStatus; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomListResponseDomainsItemCiphersList | null; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */ minTLS?: BucketsDomainsCustomListResponseDomainsItemMinTLS | null; /** Zone ID of the custom domain resides in. */ zoneId?: string | null; /** Zone that the custom domain resides in. */ zoneName?: string | null; } export const BucketsDomainsCustomListResponseDomainsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ domain: S.String, enabled: S.Boolean, status: BucketsDomainsCustomListResponseDomainsItemStatus, ciphers: S.optional( S.NullOr(BucketsDomainsCustomListResponseDomainsItemCiphersList), ), minTLS: S.optional( S.NullOr(BucketsDomainsCustomListResponseDomainsItemMinTLS), ), zoneId: S.optional(S.NullOr(S.String)), zoneName: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsDomainsCustomListResponseDomainsItem", }) as any as S.Schema; export type BucketsDomainsCustomListResponseDomainsList = Array; export const BucketsDomainsCustomListResponseDomainsList = /*@__PURE__*/ S.Array( BucketsDomainsCustomListResponseDomainsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListBucketDomainCustomsResponse { domains: BucketsDomainsCustomListResponseDomainsList; } export const ListBucketDomainCustomsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ domains: BucketsDomainsCustomListResponseDomainsList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketDomainCustomsResponse", }) as any as S.Schema; export type BucketsDomainsManagedListRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsManagedListRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface ListBucketDomainManagedsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsManagedListRequestCfR2Jurisdiction | (string & {}); } export const ListBucketDomainManagedsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsDomainsManagedListRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketDomainManagedsRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListBucketDomainManagedsResponse { /** Bucket ID. */ bucketId: string; /** Domain name of the bucket's r2.dev domain. */ domain: string; /** Whether this bucket is publicly accessible at the r2.dev domain. */ enabled: boolean; } export const ListBucketDomainManagedsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ bucketId: S.String, domain: S.String, enabled: S.Boolean, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketDomainManagedsResponse", }) as any as S.Schema; export type BucketsEventNotificationsListRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsEventNotificationsListRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface ListBucketEventNotificationsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsEventNotificationsListRequestCfR2Jurisdiction | (string & {}); } export const ListBucketEventNotificationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), jurisdiction: S.optional( BucketsEventNotificationsListRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketEventNotificationsRequest", }) as any as S.Schema; export type BucketsEventNotificationsListResponseQueuesItemRulesItemActionsItem = | "PutObject" | "CopyObject" | "DeleteObject" | "CompleteMultipartUpload" | "LifecycleDeletion"; export const BucketsEventNotificationsListResponseQueuesItemRulesItemActionsItem = /*@__PURE__*/ S.String; export type BucketsEventNotificationsListResponseQueuesItemRulesItemActionsList = Array; export const BucketsEventNotificationsListResponseQueuesItemRulesItemActionsList = /*@__PURE__*/ S.Array( BucketsEventNotificationsListResponseQueuesItemRulesItemActionsItem, ) as any as S.Schema; export interface BucketsEventNotificationsListResponseQueuesItemRulesItem { /** Array of R2 object actions that will trigger notifications. */ actions: BucketsEventNotificationsListResponseQueuesItemRulesItemActionsList; /** Timestamp when the rule was created. */ createdAt?: string | null; /** A description that can be used to identify the event notification rule after creation. */ description?: string | null; /** Notifications will be sent only for objects with this prefix. */ prefix?: string | null; /** Rule ID. */ ruleId?: string | null; /** Notifications will be sent only for objects with this suffix. */ suffix?: string | null; } export const BucketsEventNotificationsListResponseQueuesItemRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ actions: BucketsEventNotificationsListResponseQueuesItemRulesItemActionsList, createdAt: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), prefix: S.optional(S.NullOr(S.String)), ruleId: S.optional(S.NullOr(S.String)), suffix: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsEventNotificationsListResponseQueuesItemRulesItem", }) as any as S.Schema; export type BucketsEventNotificationsListResponseQueuesItemRulesList = Array; export const BucketsEventNotificationsListResponseQueuesItemRulesList = /*@__PURE__*/ S.Array( BucketsEventNotificationsListResponseQueuesItemRulesItem, ) as any as S.Schema; export interface BucketsEventNotificationsListResponseQueuesItem { /** Queue ID. */ queueId?: string | null; /** Name of the queue. */ queueName?: string | null; rules?: BucketsEventNotificationsListResponseQueuesItemRulesList | null; } export const BucketsEventNotificationsListResponseQueuesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ queueId: S.optional(S.NullOr(S.String)), queueName: S.optional(S.NullOr(S.String)), rules: S.optional( S.NullOr(BucketsEventNotificationsListResponseQueuesItemRulesList), ), }), ).annotate({ identifier: "BucketsEventNotificationsListResponseQueuesItem", }) as any as S.Schema; export type BucketsEventNotificationsListResponseQueuesList = Array; export const BucketsEventNotificationsListResponseQueuesList = /*@__PURE__*/ S.Array( BucketsEventNotificationsListResponseQueuesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListBucketEventNotificationsResponse { /** Name of the bucket. */ bucketName?: string | null; /** List of queues associated with the bucket. */ queues?: BucketsEventNotificationsListResponseQueuesList | null; } export const ListBucketEventNotificationsResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ bucketName: S.optional(S.NullOr(S.String)), queues: S.optional( S.NullOr(BucketsEventNotificationsListResponseQueuesList), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketEventNotificationsResponse", }) as any as S.Schema; export interface ListBucketMetricsRequest { /** Account ID. */ accountId: string; } export const ListBucketMetricsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/metrics", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketMetricsRequest", }) as any as S.Schema; export interface BucketsMetricsListResponseInfrequentAccessPublished { /** Amount of. */ metadataSize?: number | null; /** Number of objects stored. */ objects?: number | null; /** Amount of storage used by object data. */ payloadSize?: number | null; } export const BucketsMetricsListResponseInfrequentAccessPublished = /*@__PURE__*/ S.suspend(() => S.Struct({ metadataSize: S.optional(S.NullOr(S.Number)), objects: S.optional(S.NullOr(S.Number)), payloadSize: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "BucketsMetricsListResponseInfrequentAccessPublished", }) as any as S.Schema; export type BucketsMetricsListResponseInfrequentAccessUploaded = BucketsMetricsListResponseInfrequentAccessPublished; export const BucketsMetricsListResponseInfrequentAccessUploaded = BucketsMetricsListResponseInfrequentAccessPublished; export interface BucketsMetricsListResponseInfrequentAccess { /** Metrics on number of objects/amount of storage used. */ published?: BucketsMetricsListResponseInfrequentAccessPublished | null; /** Metrics on number of objects/amount of storage used. */ uploaded?: BucketsMetricsListResponseInfrequentAccessPublished | null; } export const BucketsMetricsListResponseInfrequentAccess = /*@__PURE__*/ S.suspend(() => S.Struct({ published: S.optional( S.NullOr(BucketsMetricsListResponseInfrequentAccessPublished), ), uploaded: S.optional( S.NullOr(BucketsMetricsListResponseInfrequentAccessPublished), ), }), ).annotate({ identifier: "BucketsMetricsListResponseInfrequentAccess", }) as any as S.Schema; export type BucketsMetricsListResponseStandardPublished = BucketsMetricsListResponseInfrequentAccessPublished; export const BucketsMetricsListResponseStandardPublished = BucketsMetricsListResponseInfrequentAccessPublished; export type BucketsMetricsListResponseStandardUploaded = BucketsMetricsListResponseInfrequentAccessPublished; export const BucketsMetricsListResponseStandardUploaded = BucketsMetricsListResponseInfrequentAccessPublished; export type BucketsMetricsListResponseStandard = BucketsMetricsListResponseInfrequentAccess; export const BucketsMetricsListResponseStandard = BucketsMetricsListResponseInfrequentAccess; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListBucketMetricsResponse { /** Metrics based on what state they are in(uploaded or published). */ infrequentAccess?: BucketsMetricsListResponseInfrequentAccess | null; /** Metrics based on what state they are in(uploaded or published). */ standard?: BucketsMetricsListResponseInfrequentAccess | null; } export const ListBucketMetricsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ infrequentAccess: S.optional( S.NullOr(BucketsMetricsListResponseInfrequentAccess), ), standard: S.optional(S.NullOr(BucketsMetricsListResponseInfrequentAccess)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketMetricsResponse", }) as any as S.Schema; export type BucketsObjectsListRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsObjectsListRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface ListBucketObjectsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Pagination cursor received from a previous List Objects call. Used to retrieve the next page of results. */ cursor?: string; /** A single character used to group keys. All keys that contain the delimiter between the prefix and the first occurrence of the delimiter after the prefix are grouped under a single result element. */ delimiter?: string; /** Maximum number of objects to return per page. */ perPage?: number; /** Restricts results to only those objects whose keys begin with the specified prefix. */ prefix?: string; /** Returns objects with keys that come after the specified key in lexicographic order. */ startAfter?: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ cfR2Jurisdiction?: BucketsObjectsListRequestCfR2Jurisdiction | (string & {}); } export const ListBucketObjectsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), cursor: S.optional(S.String.pipe(T.Query())), delimiter: S.optional(S.String.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), prefix: S.optional(S.String.pipe(T.Query())), startAfter: S.optional(S.String.pipe(T.Query("start_after"))), cfR2Jurisdiction: S.optional( BucketsObjectsListRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/objects", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketObjectsRequest", }) as any as S.Schema; export type BucketsObjectsListResultItemCustomMetadataMap = { [key: string]: string | undefined; }; export const BucketsObjectsListResultItemCustomMetadataMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface BucketsObjectsListResultItemHttpMetadata { /** Specifies caching behavior for the object. */ cacheControl?: string | null; /** The date and time at which the object's cache entry expires. */ cacheExpiry?: string | null; /** Specifies presentational information for the object. */ contentDisposition?: string | null; /** Specifies the content encoding applied to the object. */ contentEncoding?: string | null; /** The language of the object content. */ contentLanguage?: string | null; /** The MIME type of the object. */ contentType?: string | null; } export const BucketsObjectsListResultItemHttpMetadata = /*@__PURE__*/ S.suspend( () => S.Struct({ cacheControl: S.optional(S.NullOr(S.String)), cacheExpiry: S.optional(S.NullOr(S.String)), contentDisposition: S.optional(S.NullOr(S.String)), contentEncoding: S.optional(S.NullOr(S.String)), contentLanguage: S.optional(S.NullOr(S.String)), contentType: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsObjectsListResultItemHttpMetadata", }) as any as S.Schema; export type BucketsObjectsListResultItemStorageClass = | "Standard" | "InfrequentAccess"; export const BucketsObjectsListResultItemStorageClass = /*@__PURE__*/ S.String; export interface BucketsObjectsListResultItem { /** Custom metadata key-value pairs associated with the object. */ customMetadata?: BucketsObjectsListResultItemCustomMetadataMap | null; /** The entity tag for the object. In JSON list/get responses this is the raw */ etag?: string | null; /** HTTP metadata associated with an R2 object. */ httpMetadata?: BucketsObjectsListResultItemHttpMetadata | null; /** The object key (name). */ key?: string | null; /** The date and time the object was last modified. */ lastModified?: string | null; /** The size of the object in bytes. */ size?: number | null; /** Whether the object is encrypted with a customer-supplied encryption key. */ ssec?: boolean | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsObjectsListResultItemStorageClass | null; } export const BucketsObjectsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ customMetadata: S.optional( S.NullOr(BucketsObjectsListResultItemCustomMetadataMap).pipe( T.Body("custom_metadata"), ), ), etag: S.optional(S.NullOr(S.String)), httpMetadata: S.optional( S.NullOr(BucketsObjectsListResultItemHttpMetadata).pipe( T.Body("http_metadata"), ), ), key: S.optional(S.NullOr(S.String)), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), size: S.optional(S.NullOr(S.Number)), ssec: S.optional(S.NullOr(S.Boolean)), storageClass: S.optional( S.NullOr(BucketsObjectsListResultItemStorageClass).pipe( T.Body("storage_class"), ), ), }), ).annotate({ identifier: "BucketsObjectsListResultItem", }) as any as S.Schema; export type BucketsObjectsListResultList = Array; export const BucketsObjectsListResultList = /*@__PURE__*/ S.Array( BucketsObjectsListResultItem, ) as any as S.Schema; export interface ListBucketObjectsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: BucketsObjectsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListBucketObjectsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: BucketsObjectsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketObjectsResponse", }) as any as S.Schema; export type BucketsListRequestDirection = "asc" | "desc"; export const BucketsListRequestDirection = /*@__PURE__*/ S.String; export type BucketsListRequestOrder = "name"; export const BucketsListRequestOrder = /*@__PURE__*/ S.String; export type BucketsListRequestCfR2Jurisdiction = "default" | "eu" | "fedramp"; export const BucketsListRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface ListBucketsRequest { /** Account ID. */ accountId: string; /** Pagination cursor received during the last List Buckets call. R2 buckets are paginated using cursors instead of page numbers. */ cursor?: string; /** Direction to order buckets. */ direction?: BucketsListRequestDirection | (string & {}); /** Bucket names to filter by. Only buckets with this phrase in their name will be returned. */ nameContains?: string; /** Field to order buckets by. */ order?: BucketsListRequestOrder | (string & {}); /** Maximum number of buckets to return in a single call. */ perPage?: number; /** Bucket name to start searching after. Buckets are ordered lexicographically. */ startAfter?: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsListRequestCfR2Jurisdiction | (string & {}); } export const ListBucketsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cursor: S.optional(S.String.pipe(T.Query())), direction: S.optional(BucketsListRequestDirection.pipe(T.Query())), nameContains: S.optional(S.String.pipe(T.Query("name_contains"))), order: S.optional(BucketsListRequestOrder.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), startAfter: S.optional(S.String.pipe(T.Query("start_after"))), jurisdiction: S.optional( BucketsListRequestCfR2Jurisdiction.pipe(T.Header("cf-r2-jurisdiction")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/r2/buckets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketsRequest", }) as any as S.Schema; export type BucketsListResponseBucketsItemJurisdiction = | "default" | "eu" | "fedramp"; export const BucketsListResponseBucketsItemJurisdiction = /*@__PURE__*/ S.String; export type BucketsListResponseBucketsItemLocation = | "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc"; export const BucketsListResponseBucketsItemLocation = /*@__PURE__*/ S.String; export type BucketsListResponseBucketsItemStorageClass = | "Standard" | "InfrequentAccess"; export const BucketsListResponseBucketsItemStorageClass = /*@__PURE__*/ S.String; export interface BucketsListResponseBucketsItem { /** Creation timestamp. */ creationDate?: string | null; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsListResponseBucketsItemJurisdiction | null; /** Location of the bucket. */ location?: BucketsListResponseBucketsItemLocation | null; /** Name of the bucket. */ name?: string | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsListResponseBucketsItemStorageClass | null; } export const BucketsListResponseBucketsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ creationDate: S.optional(S.NullOr(S.String).pipe(T.Body("creation_date"))), jurisdiction: S.optional( S.NullOr(BucketsListResponseBucketsItemJurisdiction), ), location: S.optional(S.NullOr(BucketsListResponseBucketsItemLocation)), name: S.optional(S.NullOr(S.String)), storageClass: S.optional( S.NullOr(BucketsListResponseBucketsItemStorageClass).pipe( T.Body("storage_class"), ), ), }), ).annotate({ identifier: "BucketsListResponseBucketsItem", }) as any as S.Schema; export type BucketsListResponseBucketsList = Array; export const BucketsListResponseBucketsList = /*@__PURE__*/ S.Array( BucketsListResponseBucketsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListBucketsResponse { buckets?: BucketsListResponseBucketsList | null; } export const ListBucketsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ buckets: S.optional(S.NullOr(BucketsListResponseBucketsList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListBucketsResponse", }) as any as S.Schema; export interface ListSuperSlurperJobLogsRequest { accountId: string; jobId: string; limit?: number; offset?: number; } export const ListSuperSlurperJobLogsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), limit: S.optional(S.Number.pipe(T.Query())), offset: S.optional(S.Number.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/slurper/jobs/{job_id}/logs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSuperSlurperJobLogsRequest", }) as any as S.Schema; export type SuperSlurperJobsLogsListResultItemLogType = | "migrationStart" | "migrationComplete" | "migrationAbort" | "migrationError" | "migrationPause" | "migrationResume" | "migrationErrorFailedContinuation" | "importErrorRetryExhaustion" | "importSkippedStorageClass" | "importSkippedOversized" | "importSkippedEmptyObject" | "importSkippedUnsupportedContentType" | "importSkippedExcludedContentType" | "importSkippedInvalidMedia" | "importSkippedRequiresRetrieval"; export const SuperSlurperJobsLogsListResultItemLogType = /*@__PURE__*/ S.String; export interface SuperSlurperJobsLogsListResultItem { createdAt?: string | null; job?: string | null; logType?: SuperSlurperJobsLogsListResultItemLogType | null; message?: string | null; objectKey?: string | null; } export const SuperSlurperJobsLogsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.optional(S.NullOr(S.String)), job: S.optional(S.NullOr(S.String)), logType: S.optional(S.NullOr(SuperSlurperJobsLogsListResultItemLogType)), message: S.optional(S.NullOr(S.String)), objectKey: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "SuperSlurperJobsLogsListResultItem", }) as any as S.Schema; export type SuperSlurperJobsLogsListResultList = Array; export const SuperSlurperJobsLogsListResultList = /*@__PURE__*/ S.Array( SuperSlurperJobsLogsListResultItem, ) as any as S.Schema; export interface ListSuperSlurperJobLogsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SuperSlurperJobsLogsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSuperSlurperJobLogsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SuperSlurperJobsLogsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSuperSlurperJobLogsResponse", }) as any as S.Schema; export interface ListSuperSlurperJobsRequest { accountId: string; limit?: number; offset?: number; } export const ListSuperSlurperJobsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), limit: S.optional(S.Number.pipe(T.Query())), offset: S.optional(S.Number.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/slurper/jobs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSuperSlurperJobsRequest", }) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaKeysList = Array; export const SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaVendor = "s3"; export const SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsListResultItemSourceS3SourceResponseSchema { bucket?: string | null; endpoint?: string | null; keys?: SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaVendor | null; } export const SuperSlurperJobsListResultItemSourceS3SourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), endpoint: S.optional(S.NullOr(S.String)), keys: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceS3SourceResponseSchemaVendor, ), ), }), ).annotate({ identifier: "SuperSlurperJobsListResultItemSourceS3SourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaKeysList = Array; export const SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaVendor = "gcs"; export const SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsListResultItemSourceGcsSourceResponseSchema { bucket?: string | null; keys?: SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaVendor | null; } export const SuperSlurperJobsListResultItemSourceGcsSourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), keys: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceGcsSourceResponseSchemaVendor, ), ), }), ).annotate({ identifier: "SuperSlurperJobsListResultItemSourceGcsSourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaJurisdiction = /*@__PURE__*/ S.String; export type SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaKeysList = Array; export const SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor = "r2"; export const SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor = /*@__PURE__*/ S.String; export interface SuperSlurperJobsListResultItemSourceR2SourceResponseSchema { bucket?: string | null; jurisdiction?: SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaJurisdiction | null; keys?: SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaKeysList | null; pathPrefix?: string | null; vendor?: SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor | null; } export const SuperSlurperJobsListResultItemSourceR2SourceResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), jurisdiction: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaJurisdiction, ), ), keys: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaKeysList, ), ), pathPrefix: S.optional(S.NullOr(S.String)), vendor: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor, ), ), }), ).annotate({ identifier: "SuperSlurperJobsListResultItemSourceR2SourceResponseSchema", }) as any as S.Schema; export type SuperSlurperJobsListResultItemSource = | SuperSlurperJobsListResultItemSourceS3SourceResponseSchema | SuperSlurperJobsListResultItemSourceGcsSourceResponseSchema | SuperSlurperJobsListResultItemSourceR2SourceResponseSchema; export const SuperSlurperJobsListResultItemSource = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["bucket", "endpoint", "keys", "pathPrefix", "vendor"], ["bucket", "keys", "pathPrefix", "vendor"], ["bucket", "jurisdiction", "keys", "pathPrefix", "vendor"], ]), ); export type SuperSlurperJobsListResultItemStatus = | "running" | "paused" | "aborted" | "completed"; export const SuperSlurperJobsListResultItemStatus = /*@__PURE__*/ S.String; export type SuperSlurperJobsListResultItemTargetJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperJobsListResultItemTargetJurisdiction = /*@__PURE__*/ S.String; export interface SuperSlurperJobsListResultItemTarget { bucket?: string | null; jurisdiction?: SuperSlurperJobsListResultItemTargetJurisdiction | null; vendor?: SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor | null; } export const SuperSlurperJobsListResultItemTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ bucket: S.optional(S.NullOr(S.String)), jurisdiction: S.optional( S.NullOr(SuperSlurperJobsListResultItemTargetJurisdiction), ), vendor: S.optional( S.NullOr( SuperSlurperJobsListResultItemSourceR2SourceResponseSchemaVendor, ), ), }), ).annotate({ identifier: "SuperSlurperJobsListResultItemTarget", }) as any as S.Schema; export interface SuperSlurperJobsListResultItem { id?: string | null; createdAt?: string | null; finishedAt?: string | null; overwrite?: boolean | null; source?: SuperSlurperJobsListResultItemSource | null; status?: SuperSlurperJobsListResultItemStatus | null; target?: SuperSlurperJobsListResultItemTarget | null; } export const SuperSlurperJobsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String)), finishedAt: S.optional(S.NullOr(S.String)), overwrite: S.optional(S.NullOr(S.Boolean)), source: S.optional(S.NullOr(SuperSlurperJobsListResultItemSource)), status: S.optional(S.NullOr(SuperSlurperJobsListResultItemStatus)), target: S.optional(S.NullOr(SuperSlurperJobsListResultItemTarget)), }), ).annotate({ identifier: "SuperSlurperJobsListResultItem", }) as any as S.Schema; export type SuperSlurperJobsListResultList = Array; export const SuperSlurperJobsListResultList = /*@__PURE__*/ S.Array( SuperSlurperJobsListResultItem, ) as any as S.Schema; export interface ListSuperSlurperJobsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SuperSlurperJobsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSuperSlurperJobsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SuperSlurperJobsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSuperSlurperJobsResponse", }) as any as S.Schema; export type BucketsEditRequestCfR2StorageClass = | "Standard" | "InfrequentAccess"; export const BucketsEditRequestCfR2StorageClass = /*@__PURE__*/ S.String; export type BucketsEditRequestCfR2Jurisdiction = "default" | "eu" | "fedramp"; export const BucketsEditRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PatchBucketRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass: BucketsEditRequestCfR2StorageClass | (string & {}); /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsEditRequestCfR2Jurisdiction | (string & {}); } export const PatchBucketRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), storageClass: BucketsEditRequestCfR2StorageClass.pipe( T.Header("cf-r2-storage-class"), ), jurisdiction: S.optional( BucketsEditRequestCfR2Jurisdiction.pipe(T.Header("cf-r2-jurisdiction")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchBucketRequest", }) as any as S.Schema; export type BucketsEditResponseJurisdiction = "default" | "eu" | "fedramp"; export const BucketsEditResponseJurisdiction = /*@__PURE__*/ S.String; export type BucketsEditResponseLocation = | "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc"; export const BucketsEditResponseLocation = /*@__PURE__*/ S.String; export type BucketsEditResponseStorageClass = "Standard" | "InfrequentAccess"; export const BucketsEditResponseStorageClass = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchBucketResponse { /** Creation timestamp. */ creationDate?: string | null; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsEditResponseJurisdiction | null; /** Location of the bucket. */ location?: BucketsEditResponseLocation | null; /** Name of the bucket. */ name?: string | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsEditResponseStorageClass | null; } export const PatchBucketResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ creationDate: S.optional(S.NullOr(S.String).pipe(T.Body("creation_date"))), jurisdiction: S.optional(S.NullOr(BucketsEditResponseJurisdiction)), location: S.optional(S.NullOr(BucketsEditResponseLocation)), name: S.optional(S.NullOr(S.String)), storageClass: S.optional( S.NullOr(BucketsEditResponseStorageClass).pipe(T.Body("storage_class")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchBucketResponse", }) as any as S.Schema; export interface PauseSuperSlurperJobRequest { accountId: string; jobId: string; } export const PauseSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/jobs/{job_id}/pause", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PauseSuperSlurperJobRequest", }) as any as S.Schema; export type PauseSuperSlurperJobResponse = string; export const PauseSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PauseSuperSlurperJobResponse", }) as any as S.Schema; export interface ProgressSuperSlurperJobRequest { accountId: string; jobId: string; } export const ProgressSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/slurper/jobs/{job_id}/progress", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ProgressSuperSlurperJobRequest", }) as any as S.Schema; export type SuperSlurperJobsProgressResponseStatus = | "running" | "paused" | "aborted" | "completed"; export const SuperSlurperJobsProgressResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ProgressSuperSlurperJobResponse { id?: string | null; createdAt?: string | null; failedObjects?: number | null; objects?: number | null; skippedObjects?: number | null; status?: SuperSlurperJobsProgressResponseStatus | null; transferredObjects?: number | null; } export const ProgressSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String)), failedObjects: S.optional(S.NullOr(S.Number)), objects: S.optional(S.NullOr(S.Number)), skippedObjects: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(SuperSlurperJobsProgressResponseStatus)), transferredObjects: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ProgressSuperSlurperJobResponse", }) as any as S.Schema; export type BucketsCorsUpdateRequestRulesItemAllowedMethodsItem = | "GET" | "PUT" | "POST" | "DELETE" | "HEAD"; export const BucketsCorsUpdateRequestRulesItemAllowedMethodsItem = /*@__PURE__*/ S.String; export type BucketsCorsUpdateRequestRulesItemAllowedMethodsList = Array< BucketsCorsUpdateRequestRulesItemAllowedMethodsItem | (string & {}) >; export const BucketsCorsUpdateRequestRulesItemAllowedMethodsList = /*@__PURE__*/ S.Array( BucketsCorsUpdateRequestRulesItemAllowedMethodsItem, ) as any as S.Schema; export type BucketsCorsUpdateRequestRulesItemAllowedOriginsList = Array; export const BucketsCorsUpdateRequestRulesItemAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsCorsUpdateRequestRulesItemAllowedHeadersList = Array; export const BucketsCorsUpdateRequestRulesItemAllowedHeadersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BucketsCorsUpdateRequestRulesItemAllowed { /** Specifies the value for the Access-Control-Allow-Methods header R2 sets when requesting objects in a bucket from a browser. */ methods: BucketsCorsUpdateRequestRulesItemAllowedMethodsList; /** Specifies the value for the Access-Control-Allow-Origin header R2 sets when requesting objects in a bucket from a browser. */ origins: BucketsCorsUpdateRequestRulesItemAllowedOriginsList; /** Specifies the value for the Access-Control-Allow-Headers header R2 sets when requesting objects in this bucket from a browser. Cross-origin requests that include custom headers (e.g. x-user-id) should specify these headers as AllowedHeaders. */ headers?: BucketsCorsUpdateRequestRulesItemAllowedHeadersList; } export const BucketsCorsUpdateRequestRulesItemAllowed = /*@__PURE__*/ S.suspend( () => S.Struct({ methods: BucketsCorsUpdateRequestRulesItemAllowedMethodsList, origins: BucketsCorsUpdateRequestRulesItemAllowedOriginsList, headers: S.optional(BucketsCorsUpdateRequestRulesItemAllowedHeadersList), }), ).annotate({ identifier: "BucketsCorsUpdateRequestRulesItemAllowed", }) as any as S.Schema; export type BucketsCorsUpdateRequestRulesItemExposeHeadersList = Array; export const BucketsCorsUpdateRequestRulesItemExposeHeadersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BucketsCorsUpdateRequestRulesItem { /** Object specifying allowed origins, methods and headers for this CORS rule. */ allowed: BucketsCorsUpdateRequestRulesItemAllowed; /** Identifier for this rule. */ id?: string; /** Specifies the headers that can be exposed back, and accessed by, the JavaScript making the cross-origin request. If you need to access headers beyond the safelisted response headers, such as Content-Encoding or cf-cache-status, you must specify it here. */ exposeHeaders?: BucketsCorsUpdateRequestRulesItemExposeHeadersList; /** Specifies the amount of time (in seconds) browsers are allowed to cache CORS preflight responses. Browsers may limit this to 2 hours or less, even if the maximum value (86400) is specified. */ maxAgeSeconds?: number; } export const BucketsCorsUpdateRequestRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ allowed: BucketsCorsUpdateRequestRulesItemAllowed, id: S.optional(S.String), exposeHeaders: S.optional( BucketsCorsUpdateRequestRulesItemExposeHeadersList, ), maxAgeSeconds: S.optional(S.Number), }), ).annotate({ identifier: "BucketsCorsUpdateRequestRulesItem", }) as any as S.Schema; export type BucketsCorsUpdateRequestRulesList = Array; export const BucketsCorsUpdateRequestRulesList = /*@__PURE__*/ S.Array( BucketsCorsUpdateRequestRulesItem, ) as any as S.Schema; export type BucketsCorsUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsCorsUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketCorsRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; rules?: BucketsCorsUpdateRequestRulesList; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsCorsUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketCorsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), rules: S.optional(BucketsCorsUpdateRequestRulesList), jurisdiction: S.optional( BucketsCorsUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/cors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketCorsRequest", }) as any as S.Schema; export type PutBucketCorsResponse = unknown; export const PutBucketCorsResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketCorsResponse", }) as any as S.Schema; export type BucketsDomainsManagedUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsManagedUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketDomainManagedRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Whether to enable public bucket access at the r2.dev domain. */ enabled: boolean; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsManagedUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketDomainManagedRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), enabled: S.Boolean, jurisdiction: S.optional( BucketsDomainsManagedUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketDomainManagedRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutBucketDomainManagedResponse { /** Bucket ID. */ bucketId: string; /** Domain name of the bucket's r2.dev domain. */ domain: string; /** Whether this bucket is publicly accessible at the r2.dev domain. */ enabled: boolean; } export const PutBucketDomainManagedResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ bucketId: S.String, domain: S.String, enabled: S.Boolean, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketDomainManagedResponse", }) as any as S.Schema; export type BucketsEventNotificationsUpdateRequestRulesItemActionsItem = | "PutObject" | "CopyObject" | "DeleteObject" | "CompleteMultipartUpload" | "LifecycleDeletion"; export const BucketsEventNotificationsUpdateRequestRulesItemActionsItem = /*@__PURE__*/ S.String; export type BucketsEventNotificationsUpdateRequestRulesItemActionsList = Array< BucketsEventNotificationsUpdateRequestRulesItemActionsItem | (string & {}) >; export const BucketsEventNotificationsUpdateRequestRulesItemActionsList = /*@__PURE__*/ S.Array( BucketsEventNotificationsUpdateRequestRulesItemActionsItem, ) as any as S.Schema; export interface BucketsEventNotificationsUpdateRequestRulesItem { /** Array of R2 object actions that will trigger notifications. */ actions: BucketsEventNotificationsUpdateRequestRulesItemActionsList; /** A description that can be used to identify the event notification rule after creation. */ description?: string; /** Notifications will be sent only for objects with this prefix. */ prefix?: string; /** Notifications will be sent only for objects with this suffix. */ suffix?: string; } export const BucketsEventNotificationsUpdateRequestRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ actions: BucketsEventNotificationsUpdateRequestRulesItemActionsList, description: S.optional(S.String), prefix: S.optional(S.String), suffix: S.optional(S.String), }), ).annotate({ identifier: "BucketsEventNotificationsUpdateRequestRulesItem", }) as any as S.Schema; export type BucketsEventNotificationsUpdateRequestRulesList = Array; export const BucketsEventNotificationsUpdateRequestRulesList = /*@__PURE__*/ S.Array( BucketsEventNotificationsUpdateRequestRulesItem, ) as any as S.Schema; export type BucketsEventNotificationsUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsEventNotificationsUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketEventNotificationRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Queue ID. */ queueId: string; /** Array of rules to drive notifications. */ rules: BucketsEventNotificationsUpdateRequestRulesList; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsEventNotificationsUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketEventNotificationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), queueId: S.String.pipe(T.Label("queue_id")), rules: BucketsEventNotificationsUpdateRequestRulesList, jurisdiction: S.optional( BucketsEventNotificationsUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketEventNotificationRequest", }) as any as S.Schema; export type PutBucketEventNotificationResponse = unknown; export const PutBucketEventNotificationResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketEventNotificationResponse", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemConditions = BucketsLifecycleGetResponseRulesItemConditions; export const BucketsLifecycleUpdateRequestRulesItemConditions = BucketsLifecycleGetResponseRulesItemConditions; export type BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionConditionType = "Age"; export const BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionCondition { maxAge: number; type: | BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionConditionType | (string & {}); } export const BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionConditionType, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionCondition", }) as any as S.Schema; export interface BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransition { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition?: BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionCondition; } export const BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransition = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: S.optional( BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransitionCondition, ), }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"; export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition { maxAge: number; type: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType; } export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeConditionType, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"; export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition { date: string; type: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType; } export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateConditionType, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionCondition = | BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleAgeCondition | BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionConditionR2LifecycleDateCondition; export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["maxAge", "type"], ["date", "type"], ]), ); export interface BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransition { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition?: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionCondition; } export const BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransition = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: S.optional( BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransitionCondition, ), }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType = "Age"; export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition { maxAge: number; type: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType; } export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAge: S.Number, type: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeConditionType, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType = "Date"; export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition { date: string; type: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType; } export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateConditionType, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemCondition = | BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleAgeCondition | BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemConditionR2LifecycleDateCondition; export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["maxAge", "type"], ["date", "type"], ]), ); export type BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemStorageClass = "InfrequentAccess"; export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemStorageClass = /*@__PURE__*/ S.String; export interface BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItem { /** Condition for lifecycle transitions to apply after an object reaches an age in seconds. */ condition: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemCondition; storageClass: | BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemStorageClass | (string & {}); } export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ condition: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemCondition, storageClass: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItemStorageClass, }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItem", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsList = Array; export const BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsList = /*@__PURE__*/ S.Array( BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsItem, ) as any as S.Schema; export interface BucketsLifecycleUpdateRequestRulesItem { /** Unique identifier for this rule. */ id: string; /** Conditions that apply to all transitions of this rule. */ conditions: BucketsLifecycleGetResponseRulesItemConditions; /** Whether or not this rule is in effect. */ enabled: boolean; /** Transition to abort ongoing multipart uploads. */ abortMultipartUploadsTransition?: BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransition; /** Transition to delete objects. */ deleteObjectsTransition?: BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransition; /** Transitions to change the storage class of objects. */ storageClassTransitions?: BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsList; } export const BucketsLifecycleUpdateRequestRulesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, conditions: BucketsLifecycleGetResponseRulesItemConditions, enabled: S.Boolean, abortMultipartUploadsTransition: S.optional( BucketsLifecycleUpdateRequestRulesItemAbortMultipartUploadsTransition, ), deleteObjectsTransition: S.optional( BucketsLifecycleUpdateRequestRulesItemDeleteObjectsTransition, ), storageClassTransitions: S.optional( BucketsLifecycleUpdateRequestRulesItemStorageClassTransitionsList, ), }), ).annotate({ identifier: "BucketsLifecycleUpdateRequestRulesItem", }) as any as S.Schema; export type BucketsLifecycleUpdateRequestRulesList = Array; export const BucketsLifecycleUpdateRequestRulesList = /*@__PURE__*/ S.Array( BucketsLifecycleUpdateRequestRulesItem, ) as any as S.Schema; export type BucketsLifecycleUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsLifecycleUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketLifecycleRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; rules?: BucketsLifecycleUpdateRequestRulesList; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsLifecycleUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketLifecycleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), rules: S.optional(BucketsLifecycleUpdateRequestRulesList), jurisdiction: S.optional( BucketsLifecycleUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketLifecycleRequest", }) as any as S.Schema; export type PutBucketLifecycleResponse = unknown; export const PutBucketLifecycleResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketLifecycleResponse", }) as any as S.Schema; export type BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeConditionType = "Age"; export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeCondition { maxAgeSeconds: number; type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeConditionType; } export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ maxAgeSeconds: S.Number, type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeConditionType, }), ).annotate({ identifier: "BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeCondition", }) as any as S.Schema; export type BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateConditionType = "Date"; export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateCondition { date: string; type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateConditionType; } export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ date: S.String, type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateConditionType, }), ).annotate({ identifier: "BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateCondition", }) as any as S.Schema; export type BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteConditionType = "Indefinite"; export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteConditionType = /*@__PURE__*/ S.String; export interface BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteCondition { type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteConditionType; } export const BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteCondition = /*@__PURE__*/ S.suspend(() => S.Struct({ type: BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteConditionType, }), ).annotate({ identifier: "BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteCondition", }) as any as S.Schema; export type BucketsLocksUpdateRequestRulesItemCondition = | BucketsLocksUpdateRequestRulesItemConditionR2LockRuleAgeCondition | BucketsLocksUpdateRequestRulesItemConditionR2LockRuleDateCondition | BucketsLocksUpdateRequestRulesItemConditionR2LockRuleIndefiniteCondition; export const BucketsLocksUpdateRequestRulesItemCondition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["maxAgeSeconds", "type"], ["date", "type"], ["type"]]), ); export interface BucketsLocksUpdateRequestRulesItem { /** Unique identifier for this rule. */ id: string; /** Condition to apply a lock rule to an object for how long in seconds. */ condition: BucketsLocksUpdateRequestRulesItemCondition; /** Whether or not this rule is in effect. */ enabled: boolean; /** Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads. */ prefix?: string; } export const BucketsLocksUpdateRequestRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, condition: BucketsLocksUpdateRequestRulesItemCondition, enabled: S.Boolean, prefix: S.optional(S.String), }), ).annotate({ identifier: "BucketsLocksUpdateRequestRulesItem", }) as any as S.Schema; export type BucketsLocksUpdateRequestRulesList = Array; export const BucketsLocksUpdateRequestRulesList = /*@__PURE__*/ S.Array( BucketsLocksUpdateRequestRulesItem, ) as any as S.Schema; export type BucketsLocksUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsLocksUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketLockRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; rules?: BucketsLocksUpdateRequestRulesList; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsLocksUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketLockRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), rules: S.optional(BucketsLocksUpdateRequestRulesList), jurisdiction: S.optional( BucketsLocksUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/lock", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketLockRequest", }) as any as S.Schema; export type PutBucketLockResponse = unknown; export const PutBucketLockResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketLockResponse", }) as any as S.Schema; export type BucketsSippyUpdateRequestDestinationR2EnableSippyAwsProvider = "r2"; export const BucketsSippyUpdateRequestDestinationR2EnableSippyAwsProvider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateRequestDestinationR2EnableSippyAws { /** ID of a Cloudflare API token. */ accessKeyId?: string; provider?: | BucketsSippyUpdateRequestDestinationR2EnableSippyAwsProvider | (string & {}); /** Value of a Cloudflare API token. */ secretAccessKey?: string; } export const BucketsSippyUpdateRequestDestinationR2EnableSippyAws = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.optional(S.String), provider: S.optional( BucketsSippyUpdateRequestDestinationR2EnableSippyAwsProvider, ), secretAccessKey: S.optional(S.String), }), ).annotate({ identifier: "BucketsSippyUpdateRequestDestinationR2EnableSippyAws", }) as any as S.Schema; export type BucketsSippyUpdateRequestDestinationR2EnableSippyGcs = BucketsSippyUpdateRequestDestinationR2EnableSippyAws; export const BucketsSippyUpdateRequestDestinationR2EnableSippyGcs = BucketsSippyUpdateRequestDestinationR2EnableSippyAws; export type BucketsSippyUpdateRequestDestination = | BucketsSippyUpdateRequestDestinationR2EnableSippyAws | BucketsSippyUpdateRequestDestinationR2EnableSippyAws; export const BucketsSippyUpdateRequestDestination = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accessKeyId", "provider", "secretAccessKey"], ["accessKeyId", "provider", "secretAccessKey"], ]), ); export type BucketsSippyUpdateRequestSourceR2EnableSippyAwsProvider = "aws"; export const BucketsSippyUpdateRequestSourceR2EnableSippyAwsProvider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateRequestSourceR2EnableSippyAws { /** Access Key ID of an IAM credential (ideally scoped to a single S3 bucket). */ accessKeyId?: string; /** Name of the AWS S3 bucket. */ bucket?: string; provider?: | BucketsSippyUpdateRequestSourceR2EnableSippyAwsProvider | (string & {}); /** Name of the AWS availability zone. */ region?: string; /** Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket). */ secretAccessKey?: string; } export const BucketsSippyUpdateRequestSourceR2EnableSippyAws = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.optional(S.String), bucket: S.optional(S.String), provider: S.optional( BucketsSippyUpdateRequestSourceR2EnableSippyAwsProvider, ), region: S.optional(S.String), secretAccessKey: S.optional(S.String), }), ).annotate({ identifier: "BucketsSippyUpdateRequestSourceR2EnableSippyAws", }) as any as S.Schema; export type BucketsSippyUpdateRequestSourceR2EnableSippyGcsProvider = "gcs"; export const BucketsSippyUpdateRequestSourceR2EnableSippyGcsProvider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateRequestSourceR2EnableSippyGcs { /** Name of the GCS bucket. */ bucket?: string; /** Client email of an IAM credential (ideally scoped to a single GCS bucket). */ clientEmail?: string; /** Private Key of an IAM credential (ideally scoped to a single GCS bucket). */ privateKey?: string; provider?: | BucketsSippyUpdateRequestSourceR2EnableSippyGcsProvider | (string & {}); } export const BucketsSippyUpdateRequestSourceR2EnableSippyGcs = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.String), clientEmail: S.optional(S.String), privateKey: S.optional(S.String), provider: S.optional( BucketsSippyUpdateRequestSourceR2EnableSippyGcsProvider, ), }), ).annotate({ identifier: "BucketsSippyUpdateRequestSourceR2EnableSippyGcs", }) as any as S.Schema; export type BucketsSippyUpdateRequestSourceR2EnableSippyS3Provider = "s3"; export const BucketsSippyUpdateRequestSourceR2EnableSippyS3Provider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateRequestSourceR2EnableSippyS3 { /** Access Key ID of an IAM credential (ideally scoped to a single S3 bucket). */ accessKeyId?: string; /** URL to the S3-compatible API of the bucket. */ bucketUrl?: string; provider?: | BucketsSippyUpdateRequestSourceR2EnableSippyS3Provider | (string & {}); /** Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket). */ secretAccessKey?: string; } export const BucketsSippyUpdateRequestSourceR2EnableSippyS3 = /*@__PURE__*/ S.suspend(() => S.Struct({ accessKeyId: S.optional(S.String), bucketUrl: S.optional(S.String), provider: S.optional( BucketsSippyUpdateRequestSourceR2EnableSippyS3Provider, ), secretAccessKey: S.optional(S.String), }), ).annotate({ identifier: "BucketsSippyUpdateRequestSourceR2EnableSippyS3", }) as any as S.Schema; export type BucketsSippyUpdateRequestSource = | BucketsSippyUpdateRequestSourceR2EnableSippyAws | BucketsSippyUpdateRequestSourceR2EnableSippyGcs | BucketsSippyUpdateRequestSourceR2EnableSippyS3; export const BucketsSippyUpdateRequestSource = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accessKeyId", "bucket", "provider", "region", "secretAccessKey"], ["bucket", "clientEmail", "privateKey", "provider"], ["accessKeyId", "bucketUrl", "provider", "secretAccessKey"], ]), ); export type BucketsSippyUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsSippyUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface PutBucketSippyRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** R2 bucket to copy objects to. */ destination?: BucketsSippyUpdateRequestDestination; /** AWS S3 bucket to copy objects from. */ source?: BucketsSippyUpdateRequestSource; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: BucketsSippyUpdateRequestCfR2Jurisdiction | (string & {}); } export const PutBucketSippyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), destination: S.optional(BucketsSippyUpdateRequestDestination), source: S.optional(BucketsSippyUpdateRequestSource), jurisdiction: S.optional( BucketsSippyUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketSippyRequest", }) as any as S.Schema; export type BucketsSippyUpdateResponseDestinationProvider = "r2"; export const BucketsSippyUpdateResponseDestinationProvider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateResponseDestination { /** ID of the Cloudflare API token used when writing objects to this */ accessKeyId?: string | null; account?: string | null; /** Name of the bucket on the provider. */ bucket?: string | null; provider?: BucketsSippyUpdateResponseDestinationProvider | null; } export const BucketsSippyUpdateResponseDestination = /*@__PURE__*/ S.suspend( () => S.Struct({ accessKeyId: S.optional(S.NullOr(S.String)), account: S.optional(S.NullOr(S.String)), bucket: S.optional(S.NullOr(S.String)), provider: S.optional( S.NullOr(BucketsSippyUpdateResponseDestinationProvider), ), }), ).annotate({ identifier: "BucketsSippyUpdateResponseDestination", }) as any as S.Schema; export type BucketsSippyUpdateResponseSourceProvider = "aws" | "gcs" | "s3"; export const BucketsSippyUpdateResponseSourceProvider = /*@__PURE__*/ S.String; export interface BucketsSippyUpdateResponseSource { /** Name of the bucket on the provider (AWS, GCS only). */ bucket?: string | null; /** S3-compatible URL (Generic S3-compatible providers only). */ bucketUrl?: string | null; provider?: BucketsSippyUpdateResponseSourceProvider | null; /** Region where the bucket resides (AWS only). */ region?: string | null; } export const BucketsSippyUpdateResponseSource = /*@__PURE__*/ S.suspend(() => S.Struct({ bucket: S.optional(S.NullOr(S.String)), bucketUrl: S.optional(S.NullOr(S.String)), provider: S.optional(S.NullOr(BucketsSippyUpdateResponseSourceProvider)), region: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "BucketsSippyUpdateResponseSource", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutBucketSippyResponse { /** Details about the configured destination bucket. */ destination?: BucketsSippyUpdateResponseDestination | null; /** State of Sippy for this bucket. */ enabled?: boolean | null; /** Details about the configured source bucket. */ source?: BucketsSippyUpdateResponseSource | null; } export const PutBucketSippyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: S.optional(S.NullOr(BucketsSippyUpdateResponseDestination)), enabled: S.optional(S.NullOr(S.Boolean)), source: S.optional(S.NullOr(BucketsSippyUpdateResponseSource)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBucketSippyResponse", }) as any as S.Schema; export interface ResumeSuperSlurperJobRequest { accountId: string; jobId: string; } export const ResumeSuperSlurperJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/jobs/{job_id}/resume", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ResumeSuperSlurperJobRequest", }) as any as S.Schema; export type ResumeSuperSlurperJobResponse = string; export const ResumeSuperSlurperJobResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ResumeSuperSlurperJobResponse", }) as any as S.Schema; export type SuperSlurperConnectivityPrecheckSourceRequestSecretR2SlurperS3SourceSchema = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export const SuperSlurperConnectivityPrecheckSourceRequestSecretR2SlurperS3SourceSchema = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export type SuperSlurperConnectivityPrecheckSourceRequestSecretR2SlurperGcsSourceSchema = SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret; export const SuperSlurperConnectivityPrecheckSourceRequestSecretR2SlurperGcsSourceSchema = SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret; export type SuperSlurperConnectivityPrecheckSourceRequestSecret = | SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret | SuperSlurperJobsCreateRequestSourceR2SlurperGcsSourceSchemaSecret; export const SuperSlurperConnectivityPrecheckSourceRequestSecret = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accessKeyId", "secretAccessKey"], ["clientEmail", "privateKey"], ]), ); export type SuperSlurperConnectivityPrecheckSourceRequestVendorEnum = | "s3" | "gcs"; export const SuperSlurperConnectivityPrecheckSourceRequestVendorEnum = /*@__PURE__*/ S.String; export type SuperSlurperConnectivityPrecheckSourceRequestVendorR2SlurperR2SourceSchema = "r2"; export const SuperSlurperConnectivityPrecheckSourceRequestVendorR2SlurperR2SourceSchema = /*@__PURE__*/ S.String; export type SuperSlurperConnectivityPrecheckSourceRequestVendor = | SuperSlurperConnectivityPrecheckSourceRequestVendorEnum | (string & {}) | SuperSlurperConnectivityPrecheckSourceRequestVendorR2SlurperR2SourceSchema | (string & {}); export const SuperSlurperConnectivityPrecheckSourceRequestVendor = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export type SuperSlurperConnectivityPrecheckSourceRequestKeysList = Array; export const SuperSlurperConnectivityPrecheckSourceRequestKeysList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SuperSlurperConnectivityPrecheckSourceRequestJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperConnectivityPrecheckSourceRequestJurisdiction = /*@__PURE__*/ S.String; export interface SourceSuperSlurperConnectivityPrecheckRequest { accountId: string; bucket: string; secret: SuperSlurperConnectivityPrecheckSourceRequestSecret; vendor: SuperSlurperConnectivityPrecheckSourceRequestVendor; /** Custom S3-compatible endpoint that must use https://. */ endpoint?: string; keys?: SuperSlurperConnectivityPrecheckSourceRequestKeysList; pathPrefix?: string; region?: string; jurisdiction?: | SuperSlurperConnectivityPrecheckSourceRequestJurisdiction | (string & {}); } export const SourceSuperSlurperConnectivityPrecheckRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucket: S.String, secret: SuperSlurperConnectivityPrecheckSourceRequestSecret, vendor: SuperSlurperConnectivityPrecheckSourceRequestVendor, endpoint: S.optional(S.String), keys: S.optional(SuperSlurperConnectivityPrecheckSourceRequestKeysList), pathPrefix: S.optional(S.String), region: S.optional(S.String), jurisdiction: S.optional( SuperSlurperConnectivityPrecheckSourceRequestJurisdiction, ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/source/connectivity-precheck", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SourceSuperSlurperConnectivityPrecheckRequest", }) as any as S.Schema; export type SuperSlurperConnectivityPrecheckSourceResponseConnectivityStatus = | "success" | "error"; export const SuperSlurperConnectivityPrecheckSourceResponseConnectivityStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface SourceSuperSlurperConnectivityPrecheckResponse { connectivityStatus?: SuperSlurperConnectivityPrecheckSourceResponseConnectivityStatus | null; } export const SourceSuperSlurperConnectivityPrecheckResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivityStatus: S.optional( S.NullOr( SuperSlurperConnectivityPrecheckSourceResponseConnectivityStatus, ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SourceSuperSlurperConnectivityPrecheckResponse", }) as any as S.Schema; export type SuperSlurperConnectivityPrecheckTargetRequestSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export const SuperSlurperConnectivityPrecheckTargetRequestSecret = SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; export type SuperSlurperConnectivityPrecheckTargetRequestVendor = "r2"; export const SuperSlurperConnectivityPrecheckTargetRequestVendor = /*@__PURE__*/ S.String; export type SuperSlurperConnectivityPrecheckTargetRequestJurisdiction = | "default" | "eu" | "fedramp"; export const SuperSlurperConnectivityPrecheckTargetRequestJurisdiction = /*@__PURE__*/ S.String; export interface TargetSuperSlurperConnectivityPrecheckRequest { accountId: string; bucket: string; secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret; vendor: SuperSlurperConnectivityPrecheckTargetRequestVendor | (string & {}); jurisdiction?: | SuperSlurperConnectivityPrecheckTargetRequestJurisdiction | (string & {}); } export const TargetSuperSlurperConnectivityPrecheckRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucket: S.String, secret: SuperSlurperJobsCreateRequestSourceR2SlurperS3SourceSchemaSecret, vendor: SuperSlurperConnectivityPrecheckTargetRequestVendor, jurisdiction: S.optional( SuperSlurperConnectivityPrecheckTargetRequestJurisdiction, ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/slurper/target/connectivity-precheck", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "TargetSuperSlurperConnectivityPrecheckRequest", }) as any as S.Schema; export type SuperSlurperConnectivityPrecheckTargetResponseConnectivityStatus = | "success" | "error"; export const SuperSlurperConnectivityPrecheckTargetResponseConnectivityStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface TargetSuperSlurperConnectivityPrecheckResponse { connectivityStatus?: SuperSlurperConnectivityPrecheckTargetResponseConnectivityStatus | null; } export const TargetSuperSlurperConnectivityPrecheckResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivityStatus: S.optional( S.NullOr( SuperSlurperConnectivityPrecheckTargetResponseConnectivityStatus, ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "TargetSuperSlurperConnectivityPrecheckResponse", }) as any as S.Schema; export type BucketsDomainsCustomUpdateRequestCiphersList = Array; export const BucketsDomainsCustomUpdateRequestCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomUpdateRequestMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomUpdateRequestMinTLS = /*@__PURE__*/ S.String; export type BucketsDomainsCustomUpdateRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsDomainsCustomUpdateRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export interface UpdateBucketDomainCustomRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Name of the custom domain. */ domain: string; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomUpdateRequestCiphersList; /** Whether to enable public bucket access at the specified custom domain. */ enabled?: boolean; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value. */ minTLS?: BucketsDomainsCustomUpdateRequestMinTLS | (string & {}); /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ jurisdiction?: | BucketsDomainsCustomUpdateRequestCfR2Jurisdiction | (string & {}); } export const UpdateBucketDomainCustomRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), domain: S.String.pipe(T.Label()), ciphers: S.optional(BucketsDomainsCustomUpdateRequestCiphersList), enabled: S.optional(S.Boolean), minTLS: S.optional(BucketsDomainsCustomUpdateRequestMinTLS), jurisdiction: S.optional( BucketsDomainsCustomUpdateRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateBucketDomainCustomRequest", }) as any as S.Schema; export type BucketsDomainsCustomUpdateResponseCiphersList = Array; export const BucketsDomainsCustomUpdateResponseCiphersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type BucketsDomainsCustomUpdateResponseMinTLS = | "1.0" | "1.1" | "1.2" | "1.3"; export const BucketsDomainsCustomUpdateResponseMinTLS = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateBucketDomainCustomResponse { /** Domain name of the affected custom domain. */ domain: string; /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */ ciphers?: BucketsDomainsCustomUpdateResponseCiphersList | null; /** Whether this bucket is publicly accessible at the specified custom domain. */ enabled?: boolean | null; /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */ minTLS?: BucketsDomainsCustomUpdateResponseMinTLS | null; } export const UpdateBucketDomainCustomResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ domain: S.String, ciphers: S.optional( S.NullOr(BucketsDomainsCustomUpdateResponseCiphersList), ), enabled: S.optional(S.NullOr(S.Boolean)), minTLS: S.optional(S.NullOr(BucketsDomainsCustomUpdateResponseMinTLS)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateBucketDomainCustomResponse", }) as any as S.Schema; export type BucketsObjectsUploadRequestCfR2Jurisdiction = | "default" | "eu" | "fedramp"; export const BucketsObjectsUploadRequestCfR2Jurisdiction = /*@__PURE__*/ S.String; export type BucketsObjectsUploadRequestCfR2StorageClass = | "Standard" | "InfrequentAccess"; export const BucketsObjectsUploadRequestCfR2StorageClass = /*@__PURE__*/ S.String; export interface UploadBucketObjectRequest { /** Account ID. */ accountId: string; /** Name of the bucket. */ bucketName: string; /** Jurisdiction where objects in this bucket are guaranteed to be stored. */ cfR2Jurisdiction?: | BucketsObjectsUploadRequestCfR2Jurisdiction | (string & {}); /** Storage class for newly uploaded objects, unless specified otherwise. */ cfR2StorageClass?: | BucketsObjectsUploadRequestCfR2StorageClass | (string & {}); /** The key (name) to assign to the object. May contain slashes for path-like keys. */ objectName: string; /** The object content — sent verbatim as the request body. */ body?: Blob | Uint8Array | ArrayBuffer | string; /** MIME type stored with the object. */ contentType?: string; /** Content disposition of the object. */ contentDisposition?: string; /** Content encoding of the object. */ contentEncoding?: string; /** Content language of the object. */ contentLanguage?: string; /** Content length of the object in bytes. */ contentLength?: string; /** Cache control directives for the object. */ cacheControl?: string; /** Expiration date of the object. */ expires?: string; /** Storage class for the object. */ cf_r2_storage_class?: string; } export const UploadBucketObjectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), bucketName: S.String.pipe(T.Label("bucket_name")), cfR2Jurisdiction: S.optional( BucketsObjectsUploadRequestCfR2Jurisdiction.pipe( T.Header("cf-r2-jurisdiction"), ), ), cfR2StorageClass: S.optional( BucketsObjectsUploadRequestCfR2StorageClass.pipe( T.Header("cf-r2-storage-class"), ), ), objectName: S.String.pipe(T.Label("object_name")), body: S.optional(S.String.pipe(T.HttpBody())), contentType: S.optional(S.String.pipe(T.Header("Content-Type"))), contentDisposition: S.optional( S.String.pipe(T.Header("Content-Disposition")), ), contentEncoding: S.optional(S.String.pipe(T.Header("Content-Encoding"))), contentLanguage: S.optional(S.String.pipe(T.Header("Content-Language"))), contentLength: S.optional(S.String.pipe(T.Header("Content-Length"))), cacheControl: S.optional(S.String.pipe(T.Header("Cache-Control"))), expires: S.optional(S.String.pipe(T.Header("Expires"))), cf_r2_storage_class: S.optional( S.String.pipe(T.Header("cf-r2-storage-class")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_name}", code: 200, bodyMediaType: "application/octet-stream", }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UploadBucketObjectRequest", }) as any as S.Schema; export type BucketsObjectsUploadResponseStorageClass = | "Standard" | "InfrequentAccess"; export const BucketsObjectsUploadResponseStorageClass = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UploadBucketObjectResponse { /** The entity tag for the uploaded object. */ etag?: string | null; /** The key (name) of the uploaded object. */ key?: string | null; /** The size of the uploaded object in bytes (as a string). */ size?: string | null; /** Storage class for newly uploaded objects, unless specified otherwise. */ storageClass?: BucketsObjectsUploadResponseStorageClass | null; /** The date and time the object was uploaded. */ uploaded?: string | null; /** The version UUID of the uploaded object. */ version?: string | null; } export const UploadBucketObjectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ etag: S.optional(S.NullOr(S.String)), key: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.String)), storageClass: S.optional( S.NullOr(BucketsObjectsUploadResponseStorageClass).pipe( T.Body("storage_class"), ), ), uploaded: S.optional(S.NullOr(S.String)), version: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UploadBucketObjectResponse", }) as any as S.Schema; export type AbortAllSuperSlurperJobError = CloudflareOpError; /** Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring. */ export const abortAllSuperSlurperJob: API.OperationMethod< AbortAllSuperSlurperJobRequest, AbortAllSuperSlurperJobResponse, AbortAllSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: AbortAllSuperSlurperJobRequest, output: AbortAllSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type AbortSuperSlurperJobError = CloudflareOpError; /** Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring. */ export const abortSuperSlurperJob: API.OperationMethod< AbortSuperSlurperJobRequest, AbortSuperSlurperJobResponse, AbortSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: AbortSuperSlurperJobRequest, output: AbortSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateBucketError = | InvalidBucketName | BucketAlreadyExists | InvalidRoute | CloudflareOpError; /** Creates a new R2 bucket. */ export const createBucket: API.OperationMethod< CreateBucketRequest, CreateBucketResponse, CreateBucketError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateBucketRequest, output: CreateBucketResponse, errors: [ InvalidBucketName, BucketAlreadyExists, InvalidRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateBucketDomainCustomError = | NoSuchBucket | InvalidBucketName | CustomDomainInUse | CloudflareOpError; /** Register a new custom domain for an existing R2 bucket. */ export const createBucketDomainCustom: API.OperationMethod< CreateBucketDomainCustomRequest, CreateBucketDomainCustomResponse, CreateBucketDomainCustomError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateBucketDomainCustomRequest, output: CreateBucketDomainCustomResponse, errors: [ NoSuchBucket, InvalidBucketName, CustomDomainInUse, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSuperSlurperJobError = CloudflareOpError; /** Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2. */ export const createSuperSlurperJob: API.OperationMethod< CreateSuperSlurperJobRequest, CreateSuperSlurperJobResponse, CreateSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSuperSlurperJobRequest, output: CreateSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateTemporaryCredentialError = CloudflareOpError; /** Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects. */ export const createTemporaryCredential: API.OperationMethod< CreateTemporaryCredentialRequest, CreateTemporaryCredentialResponse, CreateTemporaryCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateTemporaryCredentialRequest, output: CreateTemporaryCredentialResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketError = | NoSuchBucket | BucketNotEmpty | InvalidRoute | NoRoute | CloudflareOpError; /** Deletes an existing R2 bucket. */ export const deleteBucket: API.OperationMethod< DeleteBucketRequest, DeleteBucketResponse, DeleteBucketError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketRequest, output: DeleteBucketResponse, errors: [ NoSuchBucket, BucketNotEmpty, InvalidRoute, NoRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketCorsError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Delete the CORS policy for a bucket. */ export const deleteBucketCors: API.OperationMethod< DeleteBucketCorsRequest, DeleteBucketCorsResponse, DeleteBucketCorsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketCorsRequest, output: DeleteBucketCorsResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketDomainCustomError = | DomainNotFound | NoSuchBucket | CloudflareOpError; /** Remove custom domain registration from an existing R2 bucket. */ export const deleteBucketDomainCustom: API.OperationMethod< DeleteBucketDomainCustomRequest, DeleteBucketDomainCustomResponse, DeleteBucketDomainCustomError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketDomainCustomRequest, output: DeleteBucketDomainCustomResponse, errors: [ DomainNotFound, NoSuchBucket, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketEventNotificationError = | BucketNotFound | EventNotificationConfigNotFound | QueueNotFound | InvalidRoute | CloudflareOpError; /** Delete an event notification rule. **If no body is provided, all rules for specified queue will be deleted**. */ export const deleteBucketEventNotification: API.OperationMethod< DeleteBucketEventNotificationRequest, DeleteBucketEventNotificationResponse, DeleteBucketEventNotificationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketEventNotificationRequest, output: DeleteBucketEventNotificationResponse, errors: [ BucketNotFound, EventNotificationConfigNotFound, QueueNotFound, InvalidRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketObjectError = | NoSuchBucket | NoSuchKey | CloudflareOpError; /** Deletes an object from an R2 bucket. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead. */ export const deleteBucketObject: API.OperationMethod< DeleteBucketObjectRequest, DeleteBucketObjectResponse, DeleteBucketObjectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketObjectRequest, output: DeleteBucketObjectResponse, errors: [NoSuchBucket, NoSuchKey, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteBucketSippyError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Disables Sippy on this bucket. */ export const deleteBucketSippy: API.OperationMethod< DeleteBucketSippyRequest, DeleteBucketSippyResponse, DeleteBucketSippyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteBucketSippyRequest, output: DeleteBucketSippyResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteObjectsError = | NoSuchBucket | InvalidRoute | NoRoute | CloudflareOpError; export const deleteObjects: API.OperationMethod< DeleteObjectsRequest, DeleteObjectsResponse, DeleteObjectsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteObjectsRequest, output: DeleteObjectsResponse, errors: [ NoSuchBucket, InvalidRoute, NoRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketError = NoSuchBucket | InvalidRoute | CloudflareOpError; /** Gets properties of an existing R2 bucket. */ export const getBucket: API.OperationMethod< GetBucketRequest, GetBucketResponse, GetBucketError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketRequest, output: GetBucketResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketCorsError = | NoSuchBucket | InvalidRoute | NoCorsConfiguration | CloudflareOpError; /** Get the CORS policy for a bucket. */ export const getBucketCors: API.OperationMethod< GetBucketCorsRequest, GetBucketCorsResponse, GetBucketCorsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketCorsRequest, output: GetBucketCorsResponse, errors: [ NoSuchBucket, InvalidRoute, NoCorsConfiguration, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketDomainCustomError = | DomainNotFound | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Get the configuration for a custom domain on an existing R2 bucket. */ export const getBucketDomainCustom: API.OperationMethod< GetBucketDomainCustomRequest, GetBucketDomainCustomResponse, GetBucketDomainCustomError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketDomainCustomRequest, output: GetBucketDomainCustomResponse, errors: [ DomainNotFound, NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketEventNotificationError = | BucketNotFound | NoEventNotificationConfig | EventNotificationConfigNotFound | QueueNotFound | InvalidRoute | Forbidden | CloudflareOpError; /** Get a single event notification rule. */ export const getBucketEventNotification: API.OperationMethod< GetBucketEventNotificationRequest, GetBucketEventNotificationResponse, GetBucketEventNotificationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketEventNotificationRequest, output: GetBucketEventNotificationResponse, errors: [ BucketNotFound, NoEventNotificationConfig, EventNotificationConfigNotFound, QueueNotFound, InvalidRoute, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketLifecycleError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Get object lifecycle rules for a bucket. */ export const getBucketLifecycle: API.OperationMethod< GetBucketLifecycleRequest, GetBucketLifecycleResponse, GetBucketLifecycleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketLifecycleRequest, output: GetBucketLifecycleResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketLockError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Get lock rules for a bucket. */ export const getBucketLock: API.OperationMethod< GetBucketLockRequest, GetBucketLockResponse, GetBucketLockError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketLockRequest, output: GetBucketLockResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketObjectError = | NoSuchBucket | InvalidRoute | NoSuchKey | CloudflareOpError; /** Retrieves an object from an R2 bucket. Returns the object body along with metadata headers. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead. */ export const getBucketObject: API.OperationMethod< GetBucketObjectRequest, GetBucketObjectResponse, GetBucketObjectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketObjectRequest, output: GetBucketObjectResponse, errors: [ NoSuchBucket, InvalidRoute, NoSuchKey, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBucketSippyError = | NoSuchBucket | InvalidRoute | Forbidden | CloudflareOpError; /** Gets configuration for Sippy for an existing R2 bucket. */ export const getBucketSippy: API.OperationMethod< GetBucketSippyRequest, GetBucketSippyResponse, GetBucketSippyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBucketSippyRequest, output: GetBucketSippyResponse, errors: [ NoSuchBucket, InvalidRoute, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSuperSlurperJobError = CloudflareOpError; /** Retrieves detailed status and configuration for a specific R2 Super Slurper migration job. */ export const getSuperSlurperJob: API.OperationMethod< GetSuperSlurperJobRequest, GetSuperSlurperJobResponse, GetSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSuperSlurperJobRequest, output: GetSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListBucketDomainCustomsError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Gets a list of all custom domains registered with an existing R2 bucket. */ export const listBucketDomainCustoms: API.OperationMethod< ListBucketDomainCustomsRequest, ListBucketDomainCustomsResponse, ListBucketDomainCustomsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListBucketDomainCustomsRequest, output: ListBucketDomainCustomsResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListBucketDomainManagedsError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Gets state of public access over the bucket's R2-managed (r2.dev) domain. */ export const listBucketDomainManageds: API.OperationMethod< ListBucketDomainManagedsRequest, ListBucketDomainManagedsResponse, ListBucketDomainManagedsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListBucketDomainManagedsRequest, output: ListBucketDomainManagedsResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListBucketEventNotificationsError = | NoSuchBucket | InvalidRoute | NoEventNotificationConfig | BucketNotFound | CloudflareOpError; /** List all event notification rules for a bucket. */ export const listBucketEventNotifications: API.OperationMethod< ListBucketEventNotificationsRequest, ListBucketEventNotificationsResponse, ListBucketEventNotificationsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListBucketEventNotificationsRequest, output: ListBucketEventNotificationsResponse, errors: [ NoSuchBucket, InvalidRoute, NoEventNotificationConfig, BucketNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListBucketMetricsError = InvalidRoute | CloudflareOpError; /** Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data. */ export const listBucketMetrics: API.OperationMethod< ListBucketMetricsRequest, ListBucketMetricsResponse, ListBucketMetricsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListBucketMetricsRequest, output: ListBucketMetricsResponse, errors: [InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListBucketObjectsError = NoSuchBucket | CloudflareOpError; /** Lists objects in an R2 bucket. Returns object metadata including key, size, etag, last modified date, HTTP metadata, and custom metadata. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead. */ export const listBucketObjects: API.PaginatedOperationMethod< ListBucketObjectsRequest, ListBucketObjectsResponse, ListBucketObjectsError, CloudflareOpContext, BucketsObjectsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListBucketObjectsRequest, output: ListBucketObjectsResponse, errors: [NoSuchBucket, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "cursor", inputToken: "cursor", outputToken: "resultInfo.cursor", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListBucketsError = InvalidRoute | CloudflareOpError; /** Lists all R2 buckets on your account. */ export const listBuckets: API.OperationMethod< ListBucketsRequest, ListBucketsResponse, ListBucketsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListBucketsRequest, output: ListBucketsResponse, errors: [InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListSuperSlurperJobLogsError = CloudflareOpError; /** Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc. */ export const listSuperSlurperJobLogs: API.PaginatedOperationMethod< ListSuperSlurperJobLogsRequest, ListSuperSlurperJobLogsResponse, ListSuperSlurperJobLogsError, CloudflareOpContext, SuperSlurperJobsLogsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSuperSlurperJobLogsRequest, output: ListSuperSlurperJobLogsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSuperSlurperJobsError = CloudflareOpError; /** Lists all R2 Super Slurper migration jobs for the account with their status. */ export const listSuperSlurperJobs: API.PaginatedOperationMethod< ListSuperSlurperJobsRequest, ListSuperSlurperJobsResponse, ListSuperSlurperJobsError, CloudflareOpContext, SuperSlurperJobsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSuperSlurperJobsRequest, output: ListSuperSlurperJobsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchBucketError = NoSuchBucket | InvalidRoute | CloudflareOpError; /** Updates properties of an existing R2 bucket. */ export const patchBucket: API.OperationMethod< PatchBucketRequest, PatchBucketResponse, PatchBucketError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchBucketRequest, output: PatchBucketResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PauseSuperSlurperJobError = CloudflareOpError; /** Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring. */ export const pauseSuperSlurperJob: API.OperationMethod< PauseSuperSlurperJobRequest, PauseSuperSlurperJobResponse, PauseSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PauseSuperSlurperJobRequest, output: PauseSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ProgressSuperSlurperJobError = CloudflareOpError; /** Retrieves current progress metrics for an R2 Super Slurper migration job */ export const progressSuperSlurperJob: API.OperationMethod< ProgressSuperSlurperJobRequest, ProgressSuperSlurperJobResponse, ProgressSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ProgressSuperSlurperJobRequest, output: ProgressSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketCorsError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Set the CORS policy for a bucket. */ export const putBucketCors: API.OperationMethod< PutBucketCorsRequest, PutBucketCorsResponse, PutBucketCorsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketCorsRequest, output: PutBucketCorsResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketDomainManagedError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Updates state of public access over the bucket's R2-managed (r2.dev) domain. */ export const putBucketDomainManaged: API.OperationMethod< PutBucketDomainManagedRequest, PutBucketDomainManagedResponse, PutBucketDomainManagedError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketDomainManagedRequest, output: PutBucketDomainManagedResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketEventNotificationError = | BucketNotFound | InvalidEventNotificationConfig | EventNotificationRuleConflict | QueueNotFound | InvalidRoute | CloudflareOpError; /** Create event notification rule. */ export const putBucketEventNotification: API.OperationMethod< PutBucketEventNotificationRequest, PutBucketEventNotificationResponse, PutBucketEventNotificationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketEventNotificationRequest, output: PutBucketEventNotificationResponse, errors: [ BucketNotFound, InvalidEventNotificationConfig, EventNotificationRuleConflict, QueueNotFound, InvalidRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketLifecycleError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Set the object lifecycle rules for a bucket. */ export const putBucketLifecycle: API.OperationMethod< PutBucketLifecycleRequest, PutBucketLifecycleResponse, PutBucketLifecycleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketLifecycleRequest, output: PutBucketLifecycleResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketLockError = | NoSuchBucket | InvalidRoute | CloudflareOpError; /** Set lock rules for a bucket. */ export const putBucketLock: API.OperationMethod< PutBucketLockRequest, PutBucketLockResponse, PutBucketLockError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketLockRequest, output: PutBucketLockResponse, errors: [NoSuchBucket, InvalidRoute, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBucketSippyError = | InvalidUpstreamCredentials | InvalidRoute | CloudflareOpError; /** Sets configuration for Sippy for an existing R2 bucket. */ export const putBucketSippy: API.OperationMethod< PutBucketSippyRequest, PutBucketSippyResponse, PutBucketSippyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBucketSippyRequest, output: PutBucketSippyResponse, errors: [ InvalidUpstreamCredentials, InvalidRoute, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ResumeSuperSlurperJobError = CloudflareOpError; /** Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped. */ export const resumeSuperSlurperJob: API.OperationMethod< ResumeSuperSlurperJobRequest, ResumeSuperSlurperJobResponse, ResumeSuperSlurperJobError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ResumeSuperSlurperJobRequest, output: ResumeSuperSlurperJobResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type SourceSuperSlurperConnectivityPrecheckError = CloudflareOpError; /** Check whether tokens are valid against the source bucket */ export const sourceSuperSlurperConnectivityPrecheck: API.OperationMethod< SourceSuperSlurperConnectivityPrecheckRequest, SourceSuperSlurperConnectivityPrecheckResponse, SourceSuperSlurperConnectivityPrecheckError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: SourceSuperSlurperConnectivityPrecheckRequest, output: SourceSuperSlurperConnectivityPrecheckResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type TargetSuperSlurperConnectivityPrecheckError = CloudflareOpError; /** Check whether tokens are valid against the target bucket */ export const targetSuperSlurperConnectivityPrecheck: API.OperationMethod< TargetSuperSlurperConnectivityPrecheckRequest, TargetSuperSlurperConnectivityPrecheckResponse, TargetSuperSlurperConnectivityPrecheckError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: TargetSuperSlurperConnectivityPrecheckRequest, output: TargetSuperSlurperConnectivityPrecheckResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateBucketDomainCustomError = NoSuchBucket | CloudflareOpError; /** Edit the configuration for a custom domain on an existing R2 bucket. */ export const updateBucketDomainCustom: API.OperationMethod< UpdateBucketDomainCustomRequest, UpdateBucketDomainCustomResponse, UpdateBucketDomainCustomError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateBucketDomainCustomRequest, output: UpdateBucketDomainCustomResponse, errors: [NoSuchBucket, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UploadBucketObjectError = NoSuchBucket | CloudflareOpError; /** Uploads an object to an R2 bucket. The object body is provided as the request body. Returns metadata about the uploaded object. The maximum upload size for this endpoint is 300 MB. For most workloads, we recommend using R2's [S3-compatible API](https://developers.cloudflare.com/r2/api/s3/api/) or a [Worker with an R2 binding](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) instead. */ export const uploadBucketObject: API.OperationMethod< UploadBucketObjectRequest, UploadBucketObjectResponse, UploadBucketObjectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UploadBucketObjectRequest, output: UploadBucketObjectResponse, errors: [NoSuchBucket, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); // Alias of deleteBucketObject (same route, alternate export name upstream). export const deleteObject = deleteBucketObject; export type DeleteObjectRequest = DeleteBucketObjectRequest; export type DeleteObjectResponse = DeleteBucketObjectResponse; export type DeleteObjectError = DeleteBucketObjectError; // Alias of getBucketObject (same route, alternate export name upstream). export const getObject = getBucketObject; export type GetObjectRequest = GetBucketObjectRequest; export type GetObjectResponse = GetBucketObjectResponse; export type GetObjectError = GetBucketObjectError; // Alias of listBucketObjects (same route, alternate export name upstream). export const listObjects = listBucketObjects; export type ListObjectsRequest = ListBucketObjectsRequest; export type ListObjectsResponse = ListBucketObjectsResponse; export type ListObjectsError = ListBucketObjectsError; // Alias of uploadBucketObject (same route, alternate export name upstream). export const putObject = uploadBucketObject; export type PutObjectRequest = UploadBucketObjectRequest; export type PutObjectResponse = UploadBucketObjectResponse; export type PutObjectError = UploadBucketObjectError;