import { FileKeyEncoded, FileKeyPart, FileKeyParts, decodeFileKey, encodeFileKey, encodeFileKeyPrefix } from "./keys.js"; import { StorageAdapter, StorageAdapterCapabilities, StorageAdapterLimits, StorageAdapterRecommendations, UploadChecksum, UploadMode, UploadTransport } from "./storage/types.js"; import { FileStatus, UploadStatus } from "./types.js"; import { CreateUploadAndTransferOptions, UploadHelpers, UploadProgress } from "./client/helpers.js"; import { FileHookPayload, UploadFragmentConfig, UploadFragmentResolvedConfig, UploadTimeoutPayload, resolveUploadFragmentConfig } from "./config.js"; import { CompletePartsInput, CreateUploadInput, CreateUploadResult, UploadProgressInput } from "./services/uploads.js"; import { ListFilesInput, UpdateFileInput } from "./services/files.js"; import { uploadRoutes } from "./routes/index.js"; import { createUploadFragmentClients } from "./client/clients.js"; import { uploadSchema } from "./schema.js"; import { FilesystemStorageAdapterOptions, createFilesystemStorageAdapter } from "./storage/fs.js"; import { S3CompatibleStorageAdapterOptions, S3Signer, S3SignerInput, createS3CompatibleStorageAdapter } from "./storage/s3.js"; import { R2StorageAdapterOptions, createR2StorageAdapter } from "./storage/r2.js"; import { uploadFragmentDefinition } from "./definition.js"; import * as _fragno_dev_core0 from "@fragno-dev/core"; import * as _fragno_dev_db0 from "@fragno-dev/db"; import { FragnoPublicConfigWithDatabase } from "@fragno-dev/db"; import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema"; import * as zod0 from "zod"; import * as zod_v4_core0 from "zod/v4/core"; import * as _fragno_dev_core_api0 from "@fragno-dev/core/api"; import * as _standard_schema_spec0 from "@standard-schema/spec"; import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder"; //#region src/index.d.ts declare function createUploadFragment(config: UploadFragmentConfig, options: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment>>; fileKey: zod0.ZodOptional; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodOptional; value: zod0.ZodString; }, zod_v4_core0.$strip>>>>; tags: zod0.ZodOptional>; visibility: zod0.ZodOptional>; uploaderId: zod0.ZodOptional; metadata: zod0.ZodOptional>; }, zod_v4_core0.$strip>, zod0.ZodObject<{ uploadId: zod0.ZodString; fileKey: zod0.ZodString; status: zod0.ZodEnum<{ created: "created"; in_progress: "in_progress"; }>; strategy: zod0.ZodEnum<{ "direct-single": "direct-single"; "direct-multipart": "direct-multipart"; proxy: "proxy"; }>; expiresAt: zod0.ZodDate; upload: zod0.ZodObject<{ mode: zod0.ZodEnum<{ single: "single"; multipart: "multipart"; }>; transport: zod0.ZodEnum<{ proxy: "proxy"; direct: "direct"; }>; uploadUrl: zod0.ZodOptional; uploadHeaders: zod0.ZodOptional>; partSizeBytes: zod0.ZodOptional; maxParts: zod0.ZodOptional; partsEndpoint: zod0.ZodOptional; completeEndpoint: zod0.ZodString; contentEndpoint: zod0.ZodOptional; }, zod_v4_core0.$strip>; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/uploads/:uploadId", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ uploadId: zod0.ZodString; fileKey: zod0.ZodString; status: zod0.ZodEnum<{ created: "created"; in_progress: "in_progress"; completed: "completed"; aborted: "aborted"; failed: "failed"; expired: "expired"; }>; strategy: zod0.ZodEnum<{ "direct-single": "direct-single"; "direct-multipart": "direct-multipart"; proxy: "proxy"; }>; expectedSizeBytes: zod0.ZodNumber; bytesUploaded: zod0.ZodNumber; partsUploaded: zod0.ZodNumber; partSizeBytes: zod0.ZodNullable; expiresAt: zod0.ZodDate; createdAt: zod0.ZodDate; updatedAt: zod0.ZodDate; completedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/uploads/:uploadId/progress", zod0.ZodObject<{ bytesUploaded: zod0.ZodOptional; partsUploaded: zod0.ZodOptional; }, zod_v4_core0.$strip>, zod0.ZodObject<{ bytesUploaded: zod0.ZodNumber; partsUploaded: zod0.ZodNumber; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/uploads/:uploadId/parts", zod0.ZodObject<{ partNumbers: zod0.ZodArray; }, zod_v4_core0.$strip>, zod0.ZodObject<{ parts: zod0.ZodArray>; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/uploads/:uploadId/parts", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ parts: zod0.ZodArray>; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/uploads/:uploadId/parts/complete", zod0.ZodObject<{ parts: zod0.ZodArray>; }, zod_v4_core0.$strip>, zod0.ZodObject<{ bytesUploaded: zod0.ZodNumber; partsUploaded: zod0.ZodNumber; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/uploads/:uploadId/complete", zod0.ZodObject<{ parts: zod0.ZodOptional>>; }, zod_v4_core0.$strip>, zod0.ZodObject<{ fileKey: zod0.ZodString; fileKeyParts: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/uploads/:uploadId/abort", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ ok: zod0.ZodLiteral; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"PUT", "/uploads/:uploadId/content", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ fileKey: zod0.ZodString; fileKeyParts: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "UPLOAD_METADATA_MISMATCH" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/files", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ fileKey: zod0.ZodString; fileKeyParts: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/files", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ files: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>>; cursor: zod0.ZodOptional; hasNextPage: zod0.ZodBoolean; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", "status" | "uploaderId" | "pageSize" | "prefix" | "cursor", _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/files/:fileKey", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ fileKey: zod0.ZodString; fileKeyParts: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"PATCH", "/files/:fileKey", zod0.ZodObject<{ filename: zod0.ZodOptional; visibility: zod0.ZodOptional>; tags: zod0.ZodOptional>>; metadata: zod0.ZodOptional>>; }, zod_v4_core0.$strip>, zod0.ZodObject<{ fileKey: zod0.ZodString; fileKeyParts: zod0.ZodArray>; uploaderId: zod0.ZodNullable; filename: zod0.ZodString; sizeBytes: zod0.ZodNumber; contentType: zod0.ZodString; checksum: zod0.ZodNullable; value: zod0.ZodString; }, zod_v4_core0.$strip>>; visibility: zod0.ZodEnum<{ private: "private"; public: "public"; unlisted: "unlisted"; }>; tags: zod0.ZodNullable>; metadata: zod0.ZodNullable>; status: zod0.ZodEnum<{ ready: "ready"; deleted: "deleted"; }>; storageProvider: zod0.ZodString; createdAt: zod0.ZodString; updatedAt: zod0.ZodString; completedAt: zod0.ZodNullable; deletedAt: zod0.ZodNullable; errorCode: zod0.ZodNullable; errorMessage: zod0.ZodNullable; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"DELETE", "/files/:fileKey", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ ok: zod0.ZodLiteral; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/files/:fileKey/download-url", _standard_schema_spec0.StandardSchemaV1 | undefined, zod0.ZodObject<{ url: zod0.ZodString; headers: zod0.ZodOptional>; expiresAt: zod0.ZodDate; }, zod_v4_core0.$strip>, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/files/:fileKey/content", _standard_schema_spec0.StandardSchemaV1 | undefined, _standard_schema_spec0.StandardSchemaV1 | undefined, "UPLOAD_NOT_FOUND" | "UPLOAD_ALREADY_ACTIVE" | "FILE_ALREADY_EXISTS" | "UPLOAD_EXPIRED" | "UPLOAD_INVALID_STATE" | "INVALID_FILE_KEY" | "INVALID_CHECKSUM" | "INVALID_REQUEST" | "STORAGE_ERROR" | "FILE_NOT_FOUND" | "SIGNED_URL_UNSUPPORTED", string, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>>, ..._fragno_dev_core0.FragnoRouteConfig<_fragno_dev_core_api0.HTTPMethod, `/_internal/${string}`, any, any, any, any, any>[]], { resolvedConfig: UploadFragmentResolvedConfig; } & _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{ file: _fragno_dev_db_schema0.Table & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"fileKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"uploaderId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"filename", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"sizeBytes", _fragno_dev_db_schema0.Column<"bigint", bigint, bigint>> & Record<"contentType", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"checksum", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"visibility", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageProvider", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"completedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date | null>> & Record<"deletedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date | null>> & Record<"errorCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"errorMessage", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record, Record> & Record<"idx_file_key", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey"]>> & Record<"idx_file_key_status", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey", "status"]>> & Record<"idx_file_key_uploaderId", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey", "uploaderId"]>> & Record<"idx_file_key_status_uploaderId", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"string", string, string>, _fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey", "status", "uploaderId"]>> & Record<"idx_file_uploaderId", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["uploaderId"]>> & Record<"idx_file_createdAt", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["createdAt"]>> & Record<"idx_file_status_createdAt", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status", "createdAt"]>>>; upload: _fragno_dev_db_schema0.Table & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"fileKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"uploaderId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"filename", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"expectedSizeBytes", _fragno_dev_db_schema0.Column<"bigint", bigint, bigint>> & Record<"contentType", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"checksum", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"visibility", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"strategy", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageProvider", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageUploadId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"uploadUrl", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"uploadHeaders", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"bytesUploaded", _fragno_dev_db_schema0.Column<"bigint", bigint | null, bigint>> & Record<"partsUploaded", _fragno_dev_db_schema0.Column<"integer", number | null, number>> & Record<"partSizeBytes", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"expiresAt", _fragno_dev_db_schema0.Column<"timestamp", _fragno_dev_db0.DbNow | Date, Date>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"completedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date | null>> & Record<"errorCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"errorMessage", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record, Record> & Record<"idx_upload_file_key", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey"]>> & Record<"idx_upload_status", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_upload_expiresAt", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["expiresAt"]>>>; upload_part: _fragno_dev_db_schema0.Table & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"uploadId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>> & Record<"partNumber", _fragno_dev_db_schema0.Column<"integer", number, number>> & Record<"etag", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"sizeBytes", _fragno_dev_db_schema0.Column<"bigint", bigint, bigint>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>>, Record & Record<"upload", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"fileKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"uploaderId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"filename", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"expectedSizeBytes", _fragno_dev_db_schema0.Column<"bigint", bigint, bigint>> & Record<"contentType", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"checksum", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"visibility", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"tags", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"metadata", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"strategy", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageProvider", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageKey", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"storageUploadId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"uploadUrl", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"uploadHeaders", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"bytesUploaded", _fragno_dev_db_schema0.Column<"bigint", bigint | null, bigint>> & Record<"partsUploaded", _fragno_dev_db_schema0.Column<"integer", number | null, number>> & Record<"partSizeBytes", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"expiresAt", _fragno_dev_db_schema0.Column<"timestamp", _fragno_dev_db0.DbNow | Date, Date>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date>> & Record<"completedAt", _fragno_dev_db_schema0.Column<"timestamp", (_fragno_dev_db0.DbNow | Date) | null, Date | null>> & Record<"errorCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"errorMessage", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record, Record> & Record<"idx_upload_file_key", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fileKey"]>> & Record<"idx_upload_status", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_upload_expiresAt", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["expiresAt"]>>>>>, Record> & Record<"idx_upload_part_upload", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["uploadId"]>> & Record<"idx_upload_part_number", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"integer", number, number>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["uploadId", "partNumber"]>>>; }>>, _fragno_dev_core0.BoundServices<{ findFileByKey: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, fileKey: FileKeyEncoded) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null>; getFileByKey: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, fileKey: FileKeyEncoded) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }>; listFiles: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, input: ListFilesInput) => _fragno_dev_db0.TxResult<_fragno_dev_db0.CursorResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }>, _fragno_dev_db0.CursorResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }>>; updateFile: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, fileKey: FileKeyEncoded, input: UpdateFileInput) => _fragno_dev_db0.TxResult<{ filename: string; visibility: string; tags: unknown; metadata: unknown; updatedAt: Date; id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; sizeBytes: bigint; contentType: string; checksum: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; markFileDeleted: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, fileKey: FileKeyEncoded, fileKeyParts: FileKeyParts, uploadId?: string) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; checkUploadAvailability: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, input: CreateUploadInput, options: { allowIdempotentReuse: boolean; }) => _fragno_dev_db0.TxResult; createUploadRecord: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, input: CreateUploadInput & { storageInit: Awaited | null; }) => Promise<{ strategy: "direct-single" | "direct-multipart" | "proxy"; storageKey: string; storageUploadId?: string; partSizeBytes?: number; expiresAt: Date; uploadUrl?: string; uploadHeaders?: Record; }>>>; allowIdempotentReuse: boolean; }) => _fragno_dev_db0.TxResult<{ reused: true; result: CreateUploadResult; } | { reused: false; result: CreateUploadResult; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; }[]]>; getUploadStatus: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; }, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; }>; getUploadParts: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; uploadId: _fragno_dev_db_schema0.FragnoReference; partNumber: number; etag: string; sizeBytes: bigint; createdAt: Date; }[], { id: _fragno_dev_db_schema0.FragnoId; uploadId: _fragno_dev_db_schema0.FragnoReference; partNumber: number; etag: string; sizeBytes: bigint; createdAt: Date; }[]>; recordUploadProgress: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string, input: UploadProgressInput) => _fragno_dev_db0.TxResult<{ bytesUploaded: bigint; partsUploaded: number; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; recordUploadParts: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string, input: CompletePartsInput) => _fragno_dev_db0.TxResult<{ partsUploaded: number; bytesUploaded: bigint; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null, { id: _fragno_dev_db_schema0.FragnoId; uploadId: _fragno_dev_db_schema0.FragnoReference; partNumber: number; etag: string; sizeBytes: bigint; createdAt: Date; }[]]>; markUploadComplete: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string, fileKey: FileKeyEncoded, options?: { sizeBytes?: bigint; }) => _fragno_dev_db0.TxResult<{ upload: { status: UploadStatus; updatedAt: Date; completedAt: Date; bytesUploaded: bigint; id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; errorCode: string | null; errorMessage: string | null; }; file: { fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: {} | null; visibility: string; tags: {} | null; metadata: {} | null; status: FileStatus; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date; deletedAt: null; errorCode: null; errorMessage: null; id: _fragno_dev_db_schema0.FragnoId; }; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; sizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; storageProvider: string; storageKey: string; createdAt: Date; updatedAt: Date; completedAt: Date | null; deletedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; markUploadFailed: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string, errorCode: string, errorMessage?: string | null) => _fragno_dev_db0.TxResult<{ upload: { status: UploadStatus; updatedAt: Date; errorCode: string; errorMessage: string | null; id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; completedAt: Date | null; }; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; markUploadAborted: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string) => _fragno_dev_db0.TxResult<{ upload: { status: UploadStatus; updatedAt: Date; errorCode: string; id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; completedAt: Date | null; errorMessage: string | null; }; }, [{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; } | null]>; getUploadStorageInfo: (this: _fragno_dev_core0.RequestThisContext & { serviceTx(schema: TSchema): _fragno_dev_db0.ServiceTxBuilder void | Promise; onUploadFailed: (payload: FileHookPayload) => void | Promise; onFileDeleted: (payload: FileHookPayload) => void | Promise; onUploadTimeout: (payload: UploadTimeoutPayload) => void | Promise; }>; }, uploadId: string) => _fragno_dev_db0.TxResult<{ id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; }, { id: _fragno_dev_db_schema0.FragnoId; fileKey: string; uploaderId: string | null; filename: string; expectedSizeBytes: bigint; contentType: string; checksum: unknown; visibility: string; tags: unknown; metadata: unknown; status: string; strategy: string; storageProvider: string; storageKey: string; storageUploadId: string | null; uploadUrl: string | null; uploadHeaders: unknown; bytesUploaded: bigint; partsUploaded: number; partSizeBytes: number | null; expiresAt: Date; createdAt: Date; updatedAt: Date; completedAt: Date | null; errorCode: string | null; errorMessage: string | null; }>; }>, _fragno_dev_db0.DatabaseServiceContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>, _fragno_dev_db0.DatabaseRequestContext<{ onFileReady: _fragno_dev_db0.HookFn; onUploadFailed: _fragno_dev_db0.HookFn; onFileDeleted: _fragno_dev_db0.HookFn; onUploadTimeout: _fragno_dev_db0.HookFn; }>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase, { _fragno_internal: _fragno_dev_db0.InternalFragmentInstance; }>; //#endregion export { type CreateUploadAndTransferOptions, type FileHookPayload, type FileKeyEncoded, type FileKeyPart, type FileKeyParts, type FilesystemStorageAdapterOptions, type R2StorageAdapterOptions, type S3CompatibleStorageAdapterOptions, type S3Signer, type S3SignerInput, type StorageAdapter, type StorageAdapterCapabilities, type StorageAdapterLimits, type StorageAdapterRecommendations, type UploadChecksum, type UploadFragmentConfig, type UploadFragmentResolvedConfig, type UploadHelpers, type UploadMode, type UploadProgress, type UploadTimeoutPayload, type UploadTransport, createFilesystemStorageAdapter, createR2StorageAdapter, createS3CompatibleStorageAdapter, createUploadFragment, createUploadFragmentClients, decodeFileKey, encodeFileKey, encodeFileKeyPrefix, resolveUploadFragmentConfig, uploadFragmentDefinition, uploadRoutes, uploadSchema }; //# sourceMappingURL=index.d.ts.map