import { ActionProcedureDescriptor } from '@voltro/protocol'; import { MutationProcedureDescriptor } from '@voltro/protocol'; import { PluginRpcClientDescriptor } from '@voltro/protocol'; import { QueryProcedureDescriptor } from '@voltro/protocol'; import { Schema } from 'effect'; export declare const abortMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.abortMultipartUpload", Schema.Struct<{ multipartToken: typeof Schema.String; }>, Schema.Struct<{ ok: typeof Schema.Boolean; }>, typeof StorageError>; export declare const beginMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.beginMultipartUpload", Schema.Struct<{ contentType: typeof Schema.String; size: typeof Schema.Number; visibility: Schema.optional>; folder: Schema.optional; tags: Schema.optional>; alt: Schema.optional; caption: Schema.optional; partSize: Schema.optional; expiresInSec: Schema.optional; }>, Schema.Struct<{ multipartToken: typeof Schema.String; partSize: typeof Schema.Number; expiresInSec: typeof Schema.Number; }>, typeof StorageError>; export declare const beginResumableUploadDescriptor: ActionProcedureDescriptor<"storage.beginResumableUpload", Schema.Struct<{ contentType: typeof Schema.String; size: typeof Schema.Number; visibility: Schema.optional>; folder: Schema.optional; tags: Schema.optional>; alt: Schema.optional; caption: Schema.optional; chunkSize: Schema.optional; expiresInSec: Schema.optional; }>, Schema.Struct<{ uploadId: typeof Schema.String; resumableToken: typeof Schema.String; uploadUrl: typeof Schema.String; chunkSize: typeof Schema.Number; expiresInSec: typeof Schema.Number; }>, typeof StorageError>; export declare const completeMultipartUploadDescriptor: ActionProcedureDescriptor<"storage.completeMultipartUpload", Schema.Struct<{ multipartToken: typeof Schema.String; parts: Schema.Array$>; }>, Schema.Struct<{ id: typeof Schema.String; url: typeof Schema.String; size: typeof Schema.Number; }>, Schema.Union<[typeof StorageError, typeof StorageRejected]>>; export declare const finalizeUploadDescriptor: ActionProcedureDescriptor<"storage.finalizeUpload", Schema.Struct<{ finalizeToken: typeof Schema.String; }>, Schema.Struct<{ id: typeof Schema.String; url: typeof Schema.String; contentType: typeof Schema.String; size: typeof Schema.Number; width: Schema.optional; height: Schema.optional; }>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>; export declare const ingestUrlDescriptor: ActionProcedureDescriptor<"storage.ingestUrl", Schema.Struct<{ url: typeof Schema.String; visibility: Schema.optional>; folder: Schema.optional; tags: Schema.optional>; alt: Schema.optional; caption: Schema.optional; key: Schema.optional; }>, Schema.Struct<{ id: typeof Schema.String; url: typeof Schema.String; }>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>; export declare const listGrantsDescriptor: QueryProcedureDescriptor<"storage.listGrants", Schema.Struct<{ refId: typeof Schema.String; }>, Schema.Struct<{ grants: Schema.Array$; principalId: typeof Schema.String; permission: Schema.Literal<["read", "write"]>; createdAt: typeof Schema.String; expiresAt: Schema.NullOr; createdBy: Schema.NullOr; }>>; }>, typeof StorageError>; /** Browse / search the stored refs by folder-prefix / tags / ownerId, paged. * The media-library / file-manager read (F6). Tenant is taken from the caller * subject server-side — a client can't list another tenant's objects. */ export declare const listRefsDescriptor: QueryProcedureDescriptor<"storage.listRefs", Schema.Struct<{ folder: Schema.optional; tags: Schema.optional>; ownerId: Schema.optional; includeDerived: Schema.optional; limit: Schema.optional; offset: Schema.optional; }>, Schema.Struct<{ refs: Schema.Array$; ownerId: Schema.NullOr; bucket: typeof Schema.String; key: typeof Schema.String; contentType: typeof Schema.String; size: typeof Schema.Number; checksum: typeof Schema.String; visibility: Schema.Literal<["public", "private"]>; hasPassword: typeof Schema.Boolean; createdAt: typeof Schema.String; width: Schema.NullOr; height: Schema.NullOr; duration: Schema.NullOr; placeholder: Schema.NullOr; folder: Schema.NullOr; tags: Schema.NullOr>; alt: Schema.NullOr; caption: Schema.NullOr; derivedFrom: Schema.NullOr; kind: Schema.NullOr; }>>; nextOffset: Schema.NullOr; }>, typeof StorageError>; export declare const mintPresignedUploadDescriptor: ActionProcedureDescriptor<"storage.mintPresignedUpload", Schema.Struct<{ contentType: typeof Schema.String; visibility: Schema.optional>; folder: Schema.optional; tags: Schema.optional>; alt: Schema.optional; caption: Schema.optional; expiresInSec: Schema.optional; }>, Schema.Struct<{ uploadUrl: typeof Schema.String; finalizeToken: typeof Schema.String; expiresInSec: typeof Schema.Number; }>, typeof StorageError>; export declare const mintUploadTicketDescriptor: ActionProcedureDescriptor<"storage.mintUploadTicket", Schema.Struct<{ contentType: typeof Schema.String; visibility: Schema.optional>; key: Schema.optional; folder: Schema.optional; tags: Schema.optional>; alt: Schema.optional; caption: Schema.optional; expiresInSec: Schema.optional; }>, Schema.Struct<{ uploadUrl: typeof Schema.String; expiresInSec: typeof Schema.Number; }>, typeof StorageError>; export declare const mintUploadUrlDescriptor: ActionProcedureDescriptor<"storage.mintUploadUrl", Schema.Struct<{ key: typeof Schema.String; contentType: typeof Schema.String; expiresInSec: Schema.optional; }>, Schema.Struct<{ url: typeof Schema.String; }>, typeof StorageError>; export declare const mintUrlDescriptor: ActionProcedureDescriptor<"storage.mintUrl", Schema.Struct<{ id: typeof Schema.String; password: Schema.optional; expiresInSec: Schema.optional; }>, Schema.Struct<{ url: typeof Schema.String; }>, Schema.Union<[typeof StorageError, typeof StorageAccessDenied]>>; export declare const revokeDescriptor: MutationProcedureDescriptor<"storage.revoke", Schema.Struct<{ grantId: typeof Schema.String; }>, Schema.Struct<{ ok: typeof Schema.Boolean; }>, typeof StorageError>; export declare const shareDescriptor: MutationProcedureDescriptor<"storage.share", Schema.Struct<{ refId: typeof Schema.String; principalType: Schema.Literal<["user", "group", "apiKey"]>; principalId: typeof Schema.String; permission: Schema.optional>; expiresInDays: Schema.optional; }>, Schema.Struct<{ grantId: typeof Schema.String; }>, typeof StorageError>; export declare const signMultipartPartDescriptor: ActionProcedureDescriptor<"storage.signMultipartPart", Schema.Struct<{ multipartToken: typeof Schema.String; partNumber: typeof Schema.Number; }>, Schema.Struct<{ url: typeof Schema.String; }>, typeof StorageError>; /** * Access to a private object was refused. Distinct from `StorageError` so * handlers can tell "not allowed" (403) from "backend blew up" (5xx) and * the wire-error union carries it typed. */ declare class StorageAccessDenied extends StorageAccessDenied_base { } declare const StorageAccessDenied_base: Schema.TaggedErrorClass; } & { refId: typeof Schema.String; reason: typeof Schema.String; }>; /** * Storage failure. `transient` drives retry — `true` for 429 / 5xx / * network blips, `false` for 4xx / config / not-found. Surfaced typed so * handlers can `Effect.catchTag('StorageError', …)`. */ declare class StorageError extends StorageError_base { } declare const StorageError_base: Schema.TaggedErrorClass; } & { provider: typeof Schema.String; message: typeof Schema.String; transient: typeof Schema.Boolean; status: Schema.optional; }>; /** An upload was rejected by a constraint (size / content-type / magic-byte * mismatch). `reason` is a stable code; `detail` is human-readable. */ declare class StorageRejected extends StorageRejected_base { } declare const StorageRejected_base: Schema.TaggedErrorClass; } & { /** `'too-large' | 'content-type-not-allowed' | 'content-mismatch'` */ reason: typeof Schema.String; detail: typeof Schema.String; }>; /** Declared for the codegen (`VoltroPlugin.rpcClientDescriptors`) so each tag is * emitted into the generated client group. Kept in lockstep with the exports. */ export declare const storageRpcClientImports: ReadonlyArray; /** An upload was rejected by the virus scanner. */ declare class StorageScanRejected extends StorageScanRejected_base { } declare const StorageScanRejected_base: Schema.TaggedErrorClass; } & { threat: typeof Schema.String; }>; export declare const uploadDescriptor: ActionProcedureDescriptor<"storage.upload", Schema.Struct<{ bytesBase64: typeof Schema.String; contentType: typeof Schema.String; visibility: Schema.optional>; key: Schema.optional; password: Schema.optional; }>, Schema.Struct<{ id: typeof Schema.String; url: typeof Schema.String; }>, Schema.Union<[typeof StorageError, typeof StorageRejected, typeof StorageScanRejected]>>; export { }