@effect-kit/storage 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE +204 -0
- package/README.md +369 -2
- package/dist/_virtual/_rolldown/runtime.js +17 -0
- package/dist/azure/account-admin.d.ts +116 -0
- package/dist/azure/account-admin.js +90 -0
- package/dist/azure/account-admin.js.map +1 -0
- package/dist/azure/admin.d.ts +68 -0
- package/dist/azure/admin.js +85 -0
- package/dist/azure/admin.js.map +1 -0
- package/dist/azure/archive.d.ts +95 -0
- package/dist/azure/archive.js +52 -0
- package/dist/azure/archive.js.map +1 -0
- package/dist/azure/events.d.ts +40 -0
- package/dist/azure/events.js +62 -0
- package/dist/azure/events.js.map +1 -0
- package/dist/azure/governance.d.ts +139 -0
- package/dist/azure/governance.js +59 -0
- package/dist/azure/governance.js.map +1 -0
- package/dist/azure/identity.d.ts +4 -0
- package/dist/azure/identity.js +8 -0
- package/dist/azure/identity.js.map +1 -0
- package/dist/azure/lifecycle.d.ts +21 -0
- package/dist/azure/lifecycle.js +193 -0
- package/dist/azure/lifecycle.js.map +1 -0
- package/dist/azure/signing.d.ts +17 -0
- package/dist/azure/signing.js +71 -0
- package/dist/azure/signing.js.map +1 -0
- package/dist/azure/uploads.d.ts +11 -0
- package/dist/azure/uploads.js +83 -0
- package/dist/azure/uploads.js.map +1 -0
- package/dist/azure.d.ts +427 -0
- package/dist/azure.js +77 -0
- package/dist/azure.js.map +1 -0
- package/dist/b2/admin.d.ts +149 -0
- package/dist/b2/admin.js +157 -0
- package/dist/b2/admin.js.map +1 -0
- package/dist/b2.d.ts +15 -0
- package/dist/b2.js +15 -0
- package/dist/b2.js.map +1 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +11 -0
- package/dist/browser.js.map +1 -0
- package/dist/bun.d.ts +14 -0
- package/dist/bun.js +17 -0
- package/dist/bun.js.map +1 -0
- package/dist/cache.d.ts +18 -0
- package/dist/cache.js +116 -0
- package/dist/cache.js.map +1 -0
- package/dist/client/atoms/controller.d.ts +10 -0
- package/dist/client/atoms/controller.js +267 -0
- package/dist/client/atoms/controller.js.map +1 -0
- package/dist/client/atoms/state.d.ts +17 -0
- package/dist/client/atoms/state.js +11 -0
- package/dist/client/atoms/state.js.map +1 -0
- package/dist/client/atoms.d.ts +59 -0
- package/dist/client/atoms.js +39 -0
- package/dist/client/atoms.js.map +1 -0
- package/dist/client/fingerprint.js +28 -0
- package/dist/client/fingerprint.js.map +1 -0
- package/dist/client/store.d.ts +31 -0
- package/dist/client/store.js +56 -0
- package/dist/client/store.js.map +1 -0
- package/dist/client/transport.d.ts +11 -0
- package/dist/client/transport.js +78 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client.d.ts +259 -0
- package/dist/client.js +350 -0
- package/dist/client.js.map +1 -0
- package/dist/composition/layer.js +22 -0
- package/dist/composition/layer.js.map +1 -0
- package/dist/composition/representation/staging.js +46 -0
- package/dist/composition/representation/staging.js.map +1 -0
- package/dist/composition/representation/storage.js +188 -0
- package/dist/composition/representation/storage.js.map +1 -0
- package/dist/composition.d.ts +20 -0
- package/dist/composition.js +124 -0
- package/dist/composition.js.map +1 -0
- package/dist/compression.d.ts +16 -0
- package/dist/compression.js +38 -0
- package/dist/compression.js.map +1 -0
- package/dist/content.d.ts +590 -0
- package/dist/content.js +168 -0
- package/dist/content.js.map +1 -0
- package/dist/core/capabilities.d.ts +53 -0
- package/dist/core/capabilities.js +9 -0
- package/dist/core/capabilities.js.map +1 -0
- package/dist/core/contracts/multipart.d.ts +56 -0
- package/dist/core/contracts/resumable.d.ts +70 -0
- package/dist/core/errors.d.ts +55 -0
- package/dist/core/errors.js +55 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/object.d.ts +97 -0
- package/dist/core/object.js +55 -0
- package/dist/core/object.js.map +1 -0
- package/dist/core/ranges.d.ts +17 -0
- package/dist/core/ranges.js +27 -0
- package/dist/core/ranges.js.map +1 -0
- package/dist/core/requests.d.ts +185 -0
- package/dist/core/requests.js +42 -0
- package/dist/core/requests.js.map +1 -0
- package/dist/core/storage.d.ts +249 -0
- package/dist/core/storage.js +173 -0
- package/dist/core/storage.js.map +1 -0
- package/dist/deno.d.ts +14 -0
- package/dist/deno.js +17 -0
- package/dist/deno.js.map +1 -0
- package/dist/encryption/age.d.ts +14 -0
- package/dist/encryption/age.js +46 -0
- package/dist/encryption/age.js.map +1 -0
- package/dist/encryption.d.ts +16 -0
- package/dist/encryption.js +16 -0
- package/dist/encryption.js.map +1 -0
- package/dist/events.d.ts +57 -0
- package/dist/events.js +106 -0
- package/dist/events.js.map +1 -0
- package/dist/filesystem.d.ts +23 -0
- package/dist/filesystem.js +75 -0
- package/dist/filesystem.js.map +1 -0
- package/dist/gcs/admin.d.ts +470 -0
- package/dist/gcs/admin.js +206 -0
- package/dist/gcs/admin.js.map +1 -0
- package/dist/gcs/events.d.ts +41 -0
- package/dist/gcs/events.js +45 -0
- package/dist/gcs/events.js.map +1 -0
- package/dist/gcs/governance.d.ts +158 -0
- package/dist/gcs/governance.js +100 -0
- package/dist/gcs/governance.js.map +1 -0
- package/dist/gcs/lifecycle.d.ts +161 -0
- package/dist/gcs/lifecycle.js +174 -0
- package/dist/gcs/lifecycle.js.map +1 -0
- package/dist/gcs/post.d.ts +31 -0
- package/dist/gcs/post.js +70 -0
- package/dist/gcs/post.js.map +1 -0
- package/dist/gcs/signing.d.ts +10 -0
- package/dist/gcs/signing.js +61 -0
- package/dist/gcs/signing.js.map +1 -0
- package/dist/gcs/uploads.d.ts +10 -0
- package/dist/gcs/uploads.js +76 -0
- package/dist/gcs/uploads.js.map +1 -0
- package/dist/gcs.d.ts +888 -0
- package/dist/gcs.js +91 -0
- package/dist/gcs.js.map +1 -0
- package/dist/hetzner/admin.d.ts +112 -0
- package/dist/hetzner/admin.js +19 -0
- package/dist/hetzner/admin.js.map +1 -0
- package/dist/hetzner.d.ts +15 -0
- package/dist/hetzner.js +15 -0
- package/dist/hetzner.js.map +1 -0
- package/dist/http/api.d.ts +236 -0
- package/dist/http/api.js +54 -0
- package/dist/http/api.js.map +1 -0
- package/dist/http/download.js +99 -0
- package/dist/http/download.js.map +1 -0
- package/dist/http/schema.d.ts +3 -0
- package/dist/http/schema.js +4 -0
- package/dist/http.d.ts +35 -0
- package/dist/http.js +178 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/internal/http/control-plane.js +71 -0
- package/dist/internal/http/control-plane.js.map +1 -0
- package/dist/internal/listing-cursor.js +44 -0
- package/dist/internal/listing-cursor.js.map +1 -0
- package/dist/internal/node/provider-errors.js +16 -0
- package/dist/internal/node/provider-errors.js.map +1 -0
- package/dist/internal/node/upload-body.js +111 -0
- package/dist/internal/node/upload-body.js.map +1 -0
- package/dist/internal/provider-response.js +14 -0
- package/dist/internal/provider-response.js.map +1 -0
- package/dist/internal/public-urls.js +30 -0
- package/dist/internal/public-urls.js.map +1 -0
- package/dist/internal/read-condition.js +11 -0
- package/dist/internal/read-condition.js.map +1 -0
- package/dist/internal/request-validation.js +24 -0
- package/dist/internal/request-validation.js.map +1 -0
- package/dist/internal/signing-request.js +22 -0
- package/dist/internal/signing-request.js.map +1 -0
- package/dist/internal/web-upload-body.js +71 -0
- package/dist/internal/web-upload-body.js.map +1 -0
- package/dist/lifecycle/configuration-state.js +26 -0
- package/dist/lifecycle/configuration-state.js.map +1 -0
- package/dist/lifecycle/metadata.js +28 -0
- package/dist/lifecycle/metadata.js.map +1 -0
- package/dist/lifecycle.d.ts +269 -0
- package/dist/lifecycle.js +72 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/migrations.d.ts +537 -0
- package/dist/migrations.js +296 -0
- package/dist/migrations.js.map +1 -0
- package/dist/minio/admin.d.ts +112 -0
- package/dist/minio/admin.js +19 -0
- package/dist/minio/admin.js.map +1 -0
- package/dist/minio.d.ts +15 -0
- package/dist/minio.js +15 -0
- package/dist/minio.js.map +1 -0
- package/dist/mirror.d.ts +830 -0
- package/dist/mirror.js +290 -0
- package/dist/mirror.js.map +1 -0
- package/dist/node.d.ts +14 -0
- package/dist/node.js +17 -0
- package/dist/node.js.map +1 -0
- package/dist/providers/azure/blocks.js +94 -0
- package/dist/providers/azure/blocks.js.map +1 -0
- package/dist/providers/azure/config.d.ts +41 -0
- package/dist/providers/azure/config.js +62 -0
- package/dist/providers/azure/config.js.map +1 -0
- package/dist/providers/azure/mapping.js +83 -0
- package/dist/providers/azure/mapping.js.map +1 -0
- package/dist/providers/azure/native.js +88 -0
- package/dist/providers/azure/native.js.map +1 -0
- package/dist/providers/azure/primitives.js +203 -0
- package/dist/providers/azure/primitives.js.map +1 -0
- package/dist/providers/azure/properties.d.ts +180 -0
- package/dist/providers/azure/properties.js +55 -0
- package/dist/providers/azure/properties.js.map +1 -0
- package/dist/providers/azure/transport.js +14 -0
- package/dist/providers/azure/transport.js.map +1 -0
- package/dist/providers/azure/validation.js +11 -0
- package/dist/providers/azure/validation.js.map +1 -0
- package/dist/providers/filesystem/envelope.js +56 -0
- package/dist/providers/filesystem/envelope.js.map +1 -0
- package/dist/providers/filesystem/identity.js +68 -0
- package/dist/providers/filesystem/identity.js.map +1 -0
- package/dist/providers/filesystem/layout.d.ts +15 -0
- package/dist/providers/filesystem/layout.js +112 -0
- package/dist/providers/filesystem/layout.js.map +1 -0
- package/dist/providers/filesystem/list.js +82 -0
- package/dist/providers/filesystem/list.js.map +1 -0
- package/dist/providers/filesystem/operations.js +134 -0
- package/dist/providers/filesystem/operations.js.map +1 -0
- package/dist/providers/gcs/config.d.ts +34 -0
- package/dist/providers/gcs/config.js +60 -0
- package/dist/providers/gcs/config.js.map +1 -0
- package/dist/providers/gcs/iam.js +45 -0
- package/dist/providers/gcs/iam.js.map +1 -0
- package/dist/providers/gcs/mapping.js +118 -0
- package/dist/providers/gcs/mapping.js.map +1 -0
- package/dist/providers/gcs/native.d.ts +11 -0
- package/dist/providers/gcs/native.js +122 -0
- package/dist/providers/gcs/native.js.map +1 -0
- package/dist/providers/gcs/primitives.js +194 -0
- package/dist/providers/gcs/primitives.js.map +1 -0
- package/dist/providers/gcs/resumable.js +145 -0
- package/dist/providers/gcs/resumable.js.map +1 -0
- package/dist/providers/gcs/tier.d.ts +176 -0
- package/dist/providers/gcs/tier.js +34 -0
- package/dist/providers/gcs/tier.js.map +1 -0
- package/dist/providers/gcs/transport.js +123 -0
- package/dist/providers/gcs/transport.js.map +1 -0
- package/dist/providers/gcs/upload.js +28 -0
- package/dist/providers/gcs/upload.js.map +1 -0
- package/dist/providers/gcs/validation.js +10 -0
- package/dist/providers/gcs/validation.js.map +1 -0
- package/dist/providers/r2-workers/binding.d.ts +102 -0
- package/dist/providers/r2-workers/body.js +82 -0
- package/dist/providers/r2-workers/body.js.map +1 -0
- package/dist/providers/r2-workers/list.js +62 -0
- package/dist/providers/r2-workers/list.js.map +1 -0
- package/dist/providers/r2-workers/mapping.js +140 -0
- package/dist/providers/r2-workers/mapping.js.map +1 -0
- package/dist/providers/r2-workers/multipart.js +121 -0
- package/dist/providers/r2-workers/multipart.js.map +1 -0
- package/dist/providers/r2-workers/primitives.js +80 -0
- package/dist/providers/r2-workers/primitives.js.map +1 -0
- package/dist/providers/s3/admin-configuration.d.ts +19 -0
- package/dist/providers/s3/admin-configuration.js +171 -0
- package/dist/providers/s3/admin-configuration.js.map +1 -0
- package/dist/providers/s3/bulk-delete.d.ts +43 -0
- package/dist/providers/s3/bulk-delete.js +58 -0
- package/dist/providers/s3/bulk-delete.js.map +1 -0
- package/dist/providers/s3/config.d.ts +43 -0
- package/dist/providers/s3/config.js +89 -0
- package/dist/providers/s3/config.js.map +1 -0
- package/dist/providers/s3/copy.d.ts +115 -0
- package/dist/providers/s3/copy.js +122 -0
- package/dist/providers/s3/copy.js.map +1 -0
- package/dist/providers/s3/lifecycle-validation.js +33 -0
- package/dist/providers/s3/lifecycle-validation.js.map +1 -0
- package/dist/providers/s3/listing.js +56 -0
- package/dist/providers/s3/listing.js.map +1 -0
- package/dist/providers/s3/metadata.d.ts +10 -0
- package/dist/providers/s3/metadata.js +90 -0
- package/dist/providers/s3/metadata.js.map +1 -0
- package/dist/providers/s3/multipart.d.ts +41 -0
- package/dist/providers/s3/multipart.js +299 -0
- package/dist/providers/s3/multipart.js.map +1 -0
- package/dist/providers/s3/native-models.d.ts +82 -0
- package/dist/providers/s3/native-models.js +91 -0
- package/dist/providers/s3/native-models.js.map +1 -0
- package/dist/providers/s3/object-mapping.js +114 -0
- package/dist/providers/s3/object-mapping.js.map +1 -0
- package/dist/providers/s3/primitives.d.ts +8 -0
- package/dist/providers/s3/primitives.js +235 -0
- package/dist/providers/s3/primitives.js.map +1 -0
- package/dist/providers/s3/profile.d.ts +25 -0
- package/dist/providers/s3/profile.js +46 -0
- package/dist/providers/s3/profile.js.map +1 -0
- package/dist/providers/s3/request-extension.js +29 -0
- package/dist/providers/s3/request-extension.js.map +1 -0
- package/dist/providers/s3/service.js +55 -0
- package/dist/providers/s3/service.js.map +1 -0
- package/dist/providers/s3/signing-credentials.js +32 -0
- package/dist/providers/s3/signing-credentials.js.map +1 -0
- package/dist/providers/s3/tags.d.ts +10 -0
- package/dist/providers/s3/tags.js +65 -0
- package/dist/providers/s3/tags.js.map +1 -0
- package/dist/providers/s3/tier.d.ts +171 -0
- package/dist/providers/s3/tier.js +100 -0
- package/dist/providers/s3/tier.js.map +1 -0
- package/dist/providers/s3/transfer-driver.js +72 -0
- package/dist/providers/s3/transfer-driver.js.map +1 -0
- package/dist/providers/s3/transport.js +94 -0
- package/dist/providers/s3/transport.js.map +1 -0
- package/dist/providers/s3/upload-body.js +10 -0
- package/dist/providers/s3/upload-body.js.map +1 -0
- package/dist/providers/s3/validation.js +31 -0
- package/dist/providers/s3/validation.js.map +1 -0
- package/dist/providers/s3/versions.d.ts +10 -0
- package/dist/providers/s3/versions.js +143 -0
- package/dist/providers/s3/versions.js.map +1 -0
- package/dist/providers/s3-compatible/config.d.ts +36 -0
- package/dist/providers/s3-compatible/config.js +174 -0
- package/dist/providers/s3-compatible/config.js.map +1 -0
- package/dist/providers/s3-compatible/service.js +48 -0
- package/dist/providers/s3-compatible/service.js.map +1 -0
- package/dist/providers/supabase/config.d.ts +20 -0
- package/dist/providers/supabase/config.js +41 -0
- package/dist/providers/supabase/config.js.map +1 -0
- package/dist/providers/supabase/mapping.js +60 -0
- package/dist/providers/supabase/mapping.js.map +1 -0
- package/dist/providers/supabase/primitives.js +205 -0
- package/dist/providers/supabase/primitives.js.map +1 -0
- package/dist/providers/supabase/transport.js +64 -0
- package/dist/providers/supabase/transport.js.map +1 -0
- package/dist/providers/supabase/tus.js +163 -0
- package/dist/providers/supabase/tus.js.map +1 -0
- package/dist/providers/tigris/configuration.js +118 -0
- package/dist/providers/tigris/configuration.js.map +1 -0
- package/dist/providers/tigris/snapshots.js +87 -0
- package/dist/providers/tigris/snapshots.js.map +1 -0
- package/dist/providers/tigris/transport.js +18 -0
- package/dist/providers/tigris/transport.js.map +1 -0
- package/dist/providers/vercel/config.d.ts +16 -0
- package/dist/providers/vercel/config.js +48 -0
- package/dist/providers/vercel/config.js.map +1 -0
- package/dist/providers/vercel/mapping.js +79 -0
- package/dist/providers/vercel/mapping.js.map +1 -0
- package/dist/providers/vercel/multipart.js +113 -0
- package/dist/providers/vercel/multipart.js.map +1 -0
- package/dist/providers/vercel/primitives.js +168 -0
- package/dist/providers/vercel/primitives.js.map +1 -0
- package/dist/providers/vercel/transport.js +32 -0
- package/dist/providers/vercel/transport.js.map +1 -0
- package/dist/providers/wasabi/compliance.d.ts +52 -0
- package/dist/providers/wasabi/compliance.js +89 -0
- package/dist/providers/wasabi/compliance.js.map +1 -0
- package/dist/providers/wasabi/xml.js +55 -0
- package/dist/providers/wasabi/xml.js.map +1 -0
- package/dist/r2/admin.d.ts +126 -0
- package/dist/r2/admin.js +138 -0
- package/dist/r2/admin.js.map +1 -0
- package/dist/r2/events.d.ts +41 -0
- package/dist/r2/events.js +37 -0
- package/dist/r2/events.js.map +1 -0
- package/dist/r2-workers.d.ts +24 -0
- package/dist/r2-workers.js +115 -0
- package/dist/r2-workers.js.map +1 -0
- package/dist/r2.d.ts +15 -0
- package/dist/r2.js +15 -0
- package/dist/r2.js.map +1 -0
- package/dist/react.d.ts +73 -0
- package/dist/react.js +49 -0
- package/dist/react.js.map +1 -0
- package/dist/representation.d.ts +24 -0
- package/dist/representation.js +7 -0
- package/dist/representation.js.map +1 -0
- package/dist/runtime/bun-filesystem.js +136 -0
- package/dist/runtime/bun-filesystem.js.map +1 -0
- package/dist/runtime/file-target.d.ts +10 -0
- package/dist/runtime/file-target.js +66 -0
- package/dist/runtime/file-target.js.map +1 -0
- package/dist/runtime/filesystem.d.ts +6 -0
- package/dist/runtime/filesystem.js +68 -0
- package/dist/runtime/filesystem.js.map +1 -0
- package/dist/runtime/node-hash.d.ts +4 -0
- package/dist/runtime/node-hash.js +31 -0
- package/dist/runtime/node-hash.js.map +1 -0
- package/dist/runtime/node-protection.d.ts +4 -0
- package/dist/runtime/node-protection.js +46 -0
- package/dist/runtime/node-protection.js.map +1 -0
- package/dist/runtime/portable-hash.d.ts +3 -0
- package/dist/runtime/portable-hash.js +31 -0
- package/dist/runtime/portable-hash.js.map +1 -0
- package/dist/runtime/session-store.d.ts +12 -0
- package/dist/runtime/session-store.js +19 -0
- package/dist/runtime/session-store.js.map +1 -0
- package/dist/runtime/web-protection.d.ts +7 -0
- package/dist/runtime/web-protection.js +54 -0
- package/dist/runtime/web-protection.js.map +1 -0
- package/dist/s3/admin.d.ts +183 -0
- package/dist/s3/admin.js +197 -0
- package/dist/s3/admin.js.map +1 -0
- package/dist/s3/archive.d.ts +25 -0
- package/dist/s3/archive.js +113 -0
- package/dist/s3/archive.js.map +1 -0
- package/dist/s3/events.d.ts +42 -0
- package/dist/s3/events.js +69 -0
- package/dist/s3/events.js.map +1 -0
- package/dist/s3/governance.d.ts +319 -0
- package/dist/s3/governance.js +108 -0
- package/dist/s3/governance.js.map +1 -0
- package/dist/s3/lifecycle.d.ts +4 -0
- package/dist/s3/lifecycle.js +5 -0
- package/dist/s3/post.d.ts +31 -0
- package/dist/s3/post.js +93 -0
- package/dist/s3/post.js.map +1 -0
- package/dist/s3/signing.d.ts +105 -0
- package/dist/s3/signing.js +198 -0
- package/dist/s3/signing.js.map +1 -0
- package/dist/s3/uploads.d.ts +11 -0
- package/dist/s3/uploads.js +173 -0
- package/dist/s3/uploads.js.map +1 -0
- package/dist/s3.d.ts +37 -0
- package/dist/s3.js +114 -0
- package/dist/s3.js.map +1 -0
- package/dist/scaleway/admin.d.ts +112 -0
- package/dist/scaleway/admin.js +19 -0
- package/dist/scaleway/admin.js.map +1 -0
- package/dist/scaleway.d.ts +15 -0
- package/dist/scaleway.js +15 -0
- package/dist/scaleway.js.map +1 -0
- package/dist/session-events.d.ts +22 -0
- package/dist/session-events.js +22 -0
- package/dist/session-events.js.map +1 -0
- package/dist/sessions/checkpoint.d.ts +423 -0
- package/dist/sessions/checkpoint.js +102 -0
- package/dist/sessions/checkpoint.js.map +1 -0
- package/dist/sessions/download.d.ts +17 -0
- package/dist/sessions/download.js +111 -0
- package/dist/sessions/download.js.map +1 -0
- package/dist/sessions/native-upload.js +168 -0
- package/dist/sessions/native-upload.js.map +1 -0
- package/dist/sessions/store.d.ts +40 -0
- package/dist/sessions/store.js +77 -0
- package/dist/sessions/store.js.map +1 -0
- package/dist/sessions/upload.d.ts +10 -0
- package/dist/sessions/upload.js +329 -0
- package/dist/sessions/upload.js.map +1 -0
- package/dist/sessions.d.ts +98 -0
- package/dist/sessions.js +268 -0
- package/dist/sessions.js.map +1 -0
- package/dist/spaces/admin.d.ts +112 -0
- package/dist/spaces/admin.js +19 -0
- package/dist/spaces/admin.js.map +1 -0
- package/dist/spaces.d.ts +15 -0
- package/dist/spaces.js +15 -0
- package/dist/spaces.js.map +1 -0
- package/dist/supabase/admin.d.ts +77 -0
- package/dist/supabase/admin.js +74 -0
- package/dist/supabase/admin.js.map +1 -0
- package/dist/supabase/s3.d.ts +311 -0
- package/dist/supabase/s3.js +153 -0
- package/dist/supabase/s3.js.map +1 -0
- package/dist/supabase/signing.d.ts +23 -0
- package/dist/supabase/signing.js +93 -0
- package/dist/supabase/signing.js.map +1 -0
- package/dist/supabase/tus-uploads.d.ts +13 -0
- package/dist/supabase/tus-uploads.js +109 -0
- package/dist/supabase/tus-uploads.js.map +1 -0
- package/dist/supabase/uploads.d.ts +5 -0
- package/dist/supabase/uploads.js +32 -0
- package/dist/supabase/uploads.js.map +1 -0
- package/dist/supabase.d.ts +100 -0
- package/dist/supabase.js +50 -0
- package/dist/supabase.js.map +1 -0
- package/dist/testing/body-failure.js +18 -0
- package/dist/testing/body-failure.js.map +1 -0
- package/dist/testing/conformance/assertions.d.ts +10 -0
- package/dist/testing/conformance/assertions.js +21 -0
- package/dist/testing/conformance/assertions.js.map +1 -0
- package/dist/testing/conformance/core-cases.js +107 -0
- package/dist/testing/conformance/core-cases.js.map +1 -0
- package/dist/testing/conformance/list-cases.js +72 -0
- package/dist/testing/conformance/list-cases.js.map +1 -0
- package/dist/testing/conformance/read-cases.js +105 -0
- package/dist/testing/conformance/read-cases.js.map +1 -0
- package/dist/testing/conformance.d.ts +23 -0
- package/dist/testing/conformance.js +37 -0
- package/dist/testing/conformance.js.map +1 -0
- package/dist/testing/faults.d.ts +258 -0
- package/dist/testing/faults.js +111 -0
- package/dist/testing/faults.js.map +1 -0
- package/dist/testing/memory-list.js +79 -0
- package/dist/testing/memory-list.js.map +1 -0
- package/dist/testing/memory-state.d.ts +18 -0
- package/dist/testing/memory-state.js +57 -0
- package/dist/testing/memory-state.js.map +1 -0
- package/dist/testing/memory-upload.js +123 -0
- package/dist/testing/memory-upload.js.map +1 -0
- package/dist/testing/memory.d.ts +23 -0
- package/dist/testing/memory.js +121 -0
- package/dist/testing/memory.js.map +1 -0
- package/dist/testing.d.ts +6 -0
- package/dist/testing.js +6 -0
- package/dist/tigris/events.d.ts +42 -0
- package/dist/tigris/events.js +42 -0
- package/dist/tigris/events.js.map +1 -0
- package/dist/tigris/native.d.ts +438 -0
- package/dist/tigris/native.js +166 -0
- package/dist/tigris/native.js.map +1 -0
- package/dist/tigris.d.ts +15 -0
- package/dist/tigris.js +15 -0
- package/dist/tigris.js.map +1 -0
- package/dist/transfers/budget.js +50 -0
- package/dist/transfers/budget.js.map +1 -0
- package/dist/transfers/copy.js +250 -0
- package/dist/transfers/copy.js.map +1 -0
- package/dist/transfers/dependencies.d.ts +10 -0
- package/dist/transfers/dependencies.js +11 -0
- package/dist/transfers/dependencies.js.map +1 -0
- package/dist/transfers/download.js +132 -0
- package/dist/transfers/download.js.map +1 -0
- package/dist/transfers/managed-runtime.d.ts +34 -0
- package/dist/transfers/managed-runtime.js +30 -0
- package/dist/transfers/managed-runtime.js.map +1 -0
- package/dist/transfers/models.d.ts +160 -0
- package/dist/transfers/native-upload.js +195 -0
- package/dist/transfers/native-upload.js.map +1 -0
- package/dist/transfers/part-receipts.js +32 -0
- package/dist/transfers/part-receipts.js.map +1 -0
- package/dist/transfers/planner.d.ts +19 -0
- package/dist/transfers/planner.js +153 -0
- package/dist/transfers/planner.js.map +1 -0
- package/dist/transfers/reader.js +81 -0
- package/dist/transfers/reader.js.map +1 -0
- package/dist/transfers/runtime.d.ts +19 -0
- package/dist/transfers/runtime.js +132 -0
- package/dist/transfers/runtime.js.map +1 -0
- package/dist/transfers/sources.d.ts +22 -0
- package/dist/transfers/sources.js +83 -0
- package/dist/transfers/sources.js.map +1 -0
- package/dist/transfers/upload.js +235 -0
- package/dist/transfers/upload.js.map +1 -0
- package/dist/transfers.d.ts +31 -0
- package/dist/transfers.js +82 -0
- package/dist/transfers.js.map +1 -0
- package/dist/uploads/driver.d.ts +22 -0
- package/dist/uploads/driver.js +18 -0
- package/dist/uploads/driver.js.map +1 -0
- package/dist/uploads/policy.d.ts +39 -0
- package/dist/uploads/schema.d.ts +278 -0
- package/dist/uploads/schema.js +167 -0
- package/dist/uploads/schema.js.map +1 -0
- package/dist/uploads/signed-driver.d.ts +8 -0
- package/dist/uploads/signed-driver.js +36 -0
- package/dist/uploads/signed-driver.js.map +1 -0
- package/dist/uploads/store.d.ts +26 -0
- package/dist/uploads/store.js +51 -0
- package/dist/uploads/store.js.map +1 -0
- package/dist/uploads/verification.js +86 -0
- package/dist/uploads/verification.js.map +1 -0
- package/dist/uploads.d.ts +518 -0
- package/dist/uploads.js +330 -0
- package/dist/uploads.js.map +1 -0
- package/dist/vercel/authorized-uploads.d.ts +7 -0
- package/dist/vercel/authorized-uploads.js +15 -0
- package/dist/vercel/authorized-uploads.js.map +1 -0
- package/dist/vercel/client.d.ts +16 -0
- package/dist/vercel/client.js +28 -0
- package/dist/vercel/client.js.map +1 -0
- package/dist/vercel/signing.d.ts +19 -0
- package/dist/vercel/signing.js +120 -0
- package/dist/vercel/signing.js.map +1 -0
- package/dist/vercel/uploads.d.ts +36 -0
- package/dist/vercel/uploads.js +161 -0
- package/dist/vercel/uploads.js.map +1 -0
- package/dist/vercel.d.ts +86 -0
- package/dist/vercel.js +46 -0
- package/dist/vercel.js.map +1 -0
- package/dist/wasabi/admin.d.ts +112 -0
- package/dist/wasabi/admin.js +19 -0
- package/dist/wasabi/admin.js.map +1 -0
- package/dist/wasabi/native.d.ts +200 -0
- package/dist/wasabi/native.js +132 -0
- package/dist/wasabi/native.js.map +1 -0
- package/dist/wasabi.d.ts +15 -0
- package/dist/wasabi.js +15 -0
- package/dist/wasabi.js.map +1 -0
- package/dist/workflows/content/collection.js +122 -0
- package/dist/workflows/content/collection.js.map +1 -0
- package/dist/workflows/content/references.js +113 -0
- package/dist/workflows/content/references.js.map +1 -0
- package/dist/workflows/content/schema.d.ts +58 -0
- package/dist/workflows/content/schema.js +64 -0
- package/dist/workflows/content/schema.js.map +1 -0
- package/dist/workflows/endpoint.js +16 -0
- package/dist/workflows/endpoint.js.map +1 -0
- package/dist/workflows/migrations/schema.d.ts +149 -0
- package/dist/workflows/migrations/schema.js +58 -0
- package/dist/workflows/migrations/schema.js.map +1 -0
- package/dist/workflows/mirror/operations.js +175 -0
- package/dist/workflows/mirror/operations.js.map +1 -0
- package/dist/workflows/mirror/schema.d.ts +68 -0
- package/dist/workflows/mirror/schema.js +57 -0
- package/dist/workflows/mirror/schema.js.map +1 -0
- package/dist/workflows/mirror/view.js +103 -0
- package/dist/workflows/mirror/view.js.map +1 -0
- package/dist/workflows/objects.js +54 -0
- package/dist/workflows/objects.js.map +1 -0
- package/dist/workflows/store.d.ts +13 -0
- package/dist/workflows/store.js +58 -0
- package/dist/workflows/store.js.map +1 -0
- package/package.json +513 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
// src/core/object.ts
|
|
4
|
+
/** An opaque key. Provider-specific encoding and limits are checked by adapters. */
|
|
5
|
+
const ObjectKey = Schema.NonEmptyString.check(Schema.makeFilter((value) => value.isWellFormed() && !value.includes("\0"), { expected: "a well-formed opaque key without NUL" }));
|
|
6
|
+
/** A JSON-safe byte count. Unsafe integers are rejected rather than rounded. */
|
|
7
|
+
const ObjectSize = Schema.Natural;
|
|
8
|
+
const NativeVersion = Schema.Union([
|
|
9
|
+
Schema.TaggedStruct("S3Version", { id: Schema.NonEmptyString }),
|
|
10
|
+
Schema.TaggedStruct("GcsGeneration", {
|
|
11
|
+
id: Schema.NonEmptyString,
|
|
12
|
+
metageneration: Schema.optional(Schema.NonEmptyString)
|
|
13
|
+
}),
|
|
14
|
+
Schema.TaggedStruct("AzureVersion", { id: Schema.NonEmptyString }),
|
|
15
|
+
Schema.TaggedStruct("AzureSnapshot", { id: Schema.NonEmptyString }),
|
|
16
|
+
Schema.TaggedStruct("OpaqueVersion", {
|
|
17
|
+
provider: Schema.NonEmptyString,
|
|
18
|
+
id: Schema.NonEmptyString
|
|
19
|
+
})
|
|
20
|
+
]);
|
|
21
|
+
const ObjectRef = Schema.Struct({
|
|
22
|
+
storeId: Schema.NonEmptyString,
|
|
23
|
+
key: ObjectKey,
|
|
24
|
+
version: Schema.optional(NativeVersion)
|
|
25
|
+
});
|
|
26
|
+
const Checksum = Schema.Struct({
|
|
27
|
+
algorithm: Schema.NonEmptyString,
|
|
28
|
+
encoding: Schema.Literals(["hex", "base64"]),
|
|
29
|
+
scope: Schema.Literals(["full-object", "composite"]),
|
|
30
|
+
value: Schema.NonEmptyString,
|
|
31
|
+
partCount: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0)))
|
|
32
|
+
});
|
|
33
|
+
const HeaderValue = Schema.String.check(Schema.makeFilter((value) => value.isWellFormed() && !/[\r\n\0]/u.test(value), { expected: "a well-formed header value without CR, LF or NUL" }));
|
|
34
|
+
const ObjectValidator = HeaderValue.check(Schema.isNonEmpty());
|
|
35
|
+
const ObjectHeaders = Schema.Struct({
|
|
36
|
+
contentType: Schema.optional(HeaderValue),
|
|
37
|
+
contentEncoding: Schema.optional(HeaderValue),
|
|
38
|
+
contentLanguage: Schema.optional(HeaderValue),
|
|
39
|
+
contentDisposition: Schema.optional(HeaderValue),
|
|
40
|
+
cacheControl: Schema.optional(HeaderValue),
|
|
41
|
+
customMetadata: Schema.optional(Schema.Record(Schema.String.check(Schema.isPattern(/^[A-Za-z0-9._-]+$/u)), HeaderValue))
|
|
42
|
+
});
|
|
43
|
+
/** Type-side timestamps are DateTime.Utc; the encoded representation uses ISO strings. */
|
|
44
|
+
const ObjectMetadata = Schema.Struct({
|
|
45
|
+
...ObjectHeaders.fields,
|
|
46
|
+
ref: ObjectRef,
|
|
47
|
+
size: Schema.optional(ObjectSize),
|
|
48
|
+
etag: Schema.optional(ObjectValidator),
|
|
49
|
+
lastModified: Schema.optional(Schema.DateTimeUtcFromString),
|
|
50
|
+
checksums: Schema.optional(Schema.Array(Checksum)),
|
|
51
|
+
storageClass: Schema.optional(Schema.NonEmptyString)
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export { Checksum, HeaderValue, NativeVersion, ObjectHeaders, ObjectKey, ObjectMetadata, ObjectRef, ObjectSize, ObjectValidator };
|
|
55
|
+
//# sourceMappingURL=object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.js","names":[],"sources":["../../src/core/object.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\n/** An opaque key. Provider-specific encoding and limits are checked by adapters. */\nexport const ObjectKey = Schema.NonEmptyString.check(\n Schema.makeFilter<string>((value) => value.isWellFormed() && !value.includes(\"\\0\"), {\n expected: \"a well-formed opaque key without NUL\",\n }),\n);\n\nexport type ObjectKey = typeof ObjectKey.Type;\n\n/** A JSON-safe byte count. Unsafe integers are rejected rather than rounded. */\nexport const ObjectSize = Schema.Natural;\n\nexport type ObjectSize = typeof ObjectSize.Type;\n\nexport const NativeVersion = Schema.Union([\n Schema.TaggedStruct(\"S3Version\", { id: Schema.NonEmptyString }),\n Schema.TaggedStruct(\"GcsGeneration\", {\n id: Schema.NonEmptyString,\n metageneration: Schema.optional(Schema.NonEmptyString),\n }),\n Schema.TaggedStruct(\"AzureVersion\", { id: Schema.NonEmptyString }),\n Schema.TaggedStruct(\"AzureSnapshot\", { id: Schema.NonEmptyString }),\n Schema.TaggedStruct(\"OpaqueVersion\", {\n provider: Schema.NonEmptyString,\n id: Schema.NonEmptyString,\n }),\n]);\n\nexport type NativeVersion = typeof NativeVersion.Type;\n\nexport const ObjectRef = Schema.Struct({\n storeId: Schema.NonEmptyString,\n key: ObjectKey,\n version: Schema.optional(NativeVersion),\n});\n\nexport type ObjectRef = typeof ObjectRef.Type;\n\nexport const Checksum = Schema.Struct({\n algorithm: Schema.NonEmptyString,\n encoding: Schema.Literals([\"hex\", \"base64\"]),\n scope: Schema.Literals([\"full-object\", \"composite\"]),\n value: Schema.NonEmptyString,\n partCount: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),\n});\n\nexport type Checksum = typeof Checksum.Type;\n\nexport const HeaderValue = Schema.String.check(\n Schema.makeFilter<string>((value) => value.isWellFormed() && !/[\\r\\n\\0]/u.test(value), {\n expected: \"a well-formed header value without CR, LF or NUL\",\n }),\n);\n\nexport const ObjectValidator = HeaderValue.check(Schema.isNonEmpty());\nexport type ObjectValidator = typeof ObjectValidator.Type;\n\nexport const ObjectHeaders = Schema.Struct({\n contentType: Schema.optional(HeaderValue),\n contentEncoding: Schema.optional(HeaderValue),\n contentLanguage: Schema.optional(HeaderValue),\n contentDisposition: Schema.optional(HeaderValue),\n cacheControl: Schema.optional(HeaderValue),\n customMetadata: Schema.optional(\n Schema.Record(Schema.String.check(Schema.isPattern(/^[A-Za-z0-9._-]+$/u)), HeaderValue),\n ),\n});\n\nexport type ObjectHeaders = typeof ObjectHeaders.Type;\n\n/** Type-side timestamps are DateTime.Utc; the encoded representation uses ISO strings. */\nexport const ObjectMetadata = Schema.Struct({\n ...ObjectHeaders.fields,\n ref: ObjectRef,\n size: Schema.optional(ObjectSize),\n etag: Schema.optional(ObjectValidator),\n lastModified: Schema.optional(Schema.DateTimeUtcFromString),\n checksums: Schema.optional(Schema.Array(Checksum)),\n storageClass: Schema.optional(Schema.NonEmptyString),\n});\n\nexport type ObjectMetadata = typeof ObjectMetadata.Type;\n"],"mappings":";;;;AAGA,MAAa,YAAY,OAAO,eAAe,MAC7C,OAAO,YAAoB,UAAU,MAAM,aAAa,KAAK,CAAC,MAAM,SAAS,IAAI,GAAG,EAClF,UAAU,uCACZ,CAAC,CACH;;AAKA,MAAa,aAAa,OAAO;AAIjC,MAAa,gBAAgB,OAAO,MAAM;CACxC,OAAO,aAAa,aAAa,EAAE,IAAI,OAAO,eAAe,CAAC;CAC9D,OAAO,aAAa,iBAAiB;EACnC,IAAI,OAAO;EACX,gBAAgB,OAAO,SAAS,OAAO,cAAc;CACvD,CAAC;CACD,OAAO,aAAa,gBAAgB,EAAE,IAAI,OAAO,eAAe,CAAC;CACjE,OAAO,aAAa,iBAAiB,EAAE,IAAI,OAAO,eAAe,CAAC;CAClE,OAAO,aAAa,iBAAiB;EACnC,UAAU,OAAO;EACjB,IAAI,OAAO;CACb,CAAC;AACH,CAAC;AAID,MAAa,YAAY,OAAO,OAAO;CACrC,SAAS,OAAO;CAChB,KAAK;CACL,SAAS,OAAO,SAAS,aAAa;AACxC,CAAC;AAID,MAAa,WAAW,OAAO,OAAO;CACpC,WAAW,OAAO;CAClB,UAAU,OAAO,SAAS,CAAC,OAAO,QAAQ,CAAC;CAC3C,OAAO,OAAO,SAAS,CAAC,eAAe,WAAW,CAAC;CACnD,OAAO,OAAO;CACd,WAAW,OAAO,SAAS,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,CAAC;AACtE,CAAC;AAID,MAAa,cAAc,OAAO,OAAO,MACvC,OAAO,YAAoB,UAAU,MAAM,aAAa,KAAK,CAAC,YAAY,KAAK,KAAK,GAAG,EACrF,UAAU,mDACZ,CAAC,CACH;AAEA,MAAa,kBAAkB,YAAY,MAAM,OAAO,WAAW,CAAC;AAGpE,MAAa,gBAAgB,OAAO,OAAO;CACzC,aAAa,OAAO,SAAS,WAAW;CACxC,iBAAiB,OAAO,SAAS,WAAW;CAC5C,iBAAiB,OAAO,SAAS,WAAW;CAC5C,oBAAoB,OAAO,SAAS,WAAW;CAC/C,cAAc,OAAO,SAAS,WAAW;CACzC,gBAAgB,OAAO,SACrB,OAAO,OAAO,OAAO,OAAO,MAAM,OAAO,UAAU,oBAAoB,CAAC,GAAG,WAAW,CACxF;AACF,CAAC;;AAKD,MAAa,iBAAiB,OAAO,OAAO;CAC1C,GAAG,cAAc;CACjB,KAAK;CACL,MAAM,OAAO,SAAS,UAAU;CAChC,MAAM,OAAO,SAAS,eAAe;CACrC,cAAc,OAAO,SAAS,OAAO,qBAAqB;CAC1D,WAAW,OAAO,SAAS,OAAO,MAAM,QAAQ,CAAC;CACjD,cAAc,OAAO,SAAS,OAAO,cAAc;AACrD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./errors.js";
|
|
2
|
+
import { Result, Schema } from "effect";
|
|
3
|
+
export declare const ByteRange: Schema.Union<readonly [Schema.TaggedStruct<"Bounded", {
|
|
4
|
+
readonly start: Schema.Natural;
|
|
5
|
+
readonly end: Schema.Natural;
|
|
6
|
+
}>, Schema.TaggedStruct<"From", {
|
|
7
|
+
readonly start: Schema.Natural;
|
|
8
|
+
}>, Schema.TaggedStruct<"Suffix", {
|
|
9
|
+
readonly length: Schema.Int;
|
|
10
|
+
}>]>;
|
|
11
|
+
export type ByteRange = typeof ByteRange.Type;
|
|
12
|
+
export interface ResolvedRange {
|
|
13
|
+
readonly start: number;
|
|
14
|
+
readonly end: number;
|
|
15
|
+
readonly totalSize: number;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ranges.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ObjectSize } from "./object.js";
|
|
2
|
+
import { storageError } from "./errors.js";
|
|
3
|
+
import { Result, Schema } from "effect";
|
|
4
|
+
|
|
5
|
+
// src/core/ranges.ts
|
|
6
|
+
const ByteRange = Schema.Union([
|
|
7
|
+
Schema.TaggedStruct("Bounded", {
|
|
8
|
+
start: ObjectSize,
|
|
9
|
+
end: ObjectSize
|
|
10
|
+
}),
|
|
11
|
+
Schema.TaggedStruct("From", { start: ObjectSize }),
|
|
12
|
+
Schema.TaggedStruct("Suffix", { length: Schema.Int.check(Schema.isGreaterThan(0)) })
|
|
13
|
+
]);
|
|
14
|
+
/** Resolves inclusive HTTP-style bounds against a known complete object size. */
|
|
15
|
+
function resolveRange(range, size, provider) {
|
|
16
|
+
const start = range._tag === "Suffix" ? Math.max(0, size - range.length) : range.start;
|
|
17
|
+
const end = range._tag === "Bounded" ? Math.min(size - 1, range.end) : size - 1;
|
|
18
|
+
if (size === 0 || start >= size || end < start) return Result.fail(storageError("get", provider, { _tag: "RangeNotSatisfiable" }));
|
|
19
|
+
return Result.succeed({
|
|
20
|
+
start,
|
|
21
|
+
end,
|
|
22
|
+
totalSize: size
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ByteRange, resolveRange };
|
|
27
|
+
//# sourceMappingURL=ranges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ranges.js","names":[],"sources":["../../src/core/ranges.ts"],"sourcesContent":["import { Result, Schema } from \"effect\";\n\nimport { storageError } from \"./errors.js\";\nimport type { StorageError } from \"./errors.js\";\nimport { ObjectSize } from \"./object.js\";\n\nexport const ByteRange = Schema.Union([\n Schema.TaggedStruct(\"Bounded\", { start: ObjectSize, end: ObjectSize }),\n Schema.TaggedStruct(\"From\", { start: ObjectSize }),\n Schema.TaggedStruct(\"Suffix\", { length: Schema.Int.check(Schema.isGreaterThan(0)) }),\n]);\n\nexport type ByteRange = typeof ByteRange.Type;\n\nexport interface ResolvedRange {\n readonly start: number;\n readonly end: number;\n readonly totalSize: number;\n}\n\n/** Resolves inclusive HTTP-style bounds against a known complete object size. */\nexport function resolveRange(\n range: ByteRange,\n size: number,\n provider: string,\n): Result.Result<ResolvedRange, StorageError> {\n const start = range._tag === \"Suffix\" ? Math.max(0, size - range.length) : range.start;\n const end = range._tag === \"Bounded\" ? Math.min(size - 1, range.end) : size - 1;\n\n if (size === 0 || start >= size || end < start) {\n return Result.fail(storageError(\"get\", provider, { _tag: \"RangeNotSatisfiable\" }));\n }\n\n return Result.succeed({ start, end, totalSize: size });\n}\n"],"mappings":";;;;;AAMA,MAAa,YAAY,OAAO,MAAM;CACpC,OAAO,aAAa,WAAW;EAAE,OAAO;EAAY,KAAK;CAAW,CAAC;CACrE,OAAO,aAAa,QAAQ,EAAE,OAAO,WAAW,CAAC;CACjD,OAAO,aAAa,UAAU,EAAE,QAAQ,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC;AACrF,CAAC;;AAWD,SAAgB,aACd,OACA,MACA,UAC4C;CAC5C,MAAM,QAAQ,MAAM,SAAS,WAAW,KAAK,IAAI,GAAG,OAAO,MAAM,MAAM,IAAI,MAAM;CACjF,MAAM,MAAM,MAAM,SAAS,YAAY,KAAK,IAAI,OAAO,GAAG,MAAM,GAAG,IAAI,OAAO;CAE9E,IAAI,SAAS,KAAK,SAAS,QAAQ,MAAM,OACvC,OAAO,OAAO,KAAK,aAAa,OAAO,UAAU,EAAE,MAAM,sBAAsB,CAAC,CAAC;CAGnF,OAAO,OAAO,QAAQ;EAAE;EAAO;EAAK,WAAW;CAAK,CAAC;AACvD"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ObjectMetadata } from "./object.js";
|
|
2
|
+
import { StorageError } from "./errors.js";
|
|
3
|
+
import { ResolvedRange } from "./ranges.js";
|
|
4
|
+
import { Schema, Scope, Stream } from "effect";
|
|
5
|
+
export declare const WriteCondition: Schema.Union<readonly [Schema.TaggedStruct<"CreateOnly", {}>, Schema.TaggedStruct<"IfMatch", {
|
|
6
|
+
readonly etag: Schema.String;
|
|
7
|
+
}>]>;
|
|
8
|
+
export type WriteCondition = typeof WriteCondition.Type;
|
|
9
|
+
export declare const ReadCondition: Schema.Union<readonly [Schema.TaggedStruct<"IfMatch", {
|
|
10
|
+
readonly etag: Schema.String;
|
|
11
|
+
}>, Schema.TaggedStruct<"IfNoneMatch", {
|
|
12
|
+
readonly etag: Schema.String;
|
|
13
|
+
}>]>;
|
|
14
|
+
export type ReadCondition = typeof ReadCondition.Type;
|
|
15
|
+
export type UploadBody<E = never, R = never> = Uint8Array | Stream.Stream<Uint8Array, E, R>;
|
|
16
|
+
export declare const PutRequest: Schema.Struct<{
|
|
17
|
+
readonly contentType: Schema.optional<Schema.String>;
|
|
18
|
+
readonly contentEncoding: Schema.optional<Schema.String>;
|
|
19
|
+
readonly contentLanguage: Schema.optional<Schema.String>;
|
|
20
|
+
readonly contentDisposition: Schema.optional<Schema.String>;
|
|
21
|
+
readonly cacheControl: Schema.optional<Schema.String>;
|
|
22
|
+
readonly customMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
23
|
+
readonly key: Schema.NonEmptyString;
|
|
24
|
+
readonly body: Schema.Unknown;
|
|
25
|
+
readonly condition: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"CreateOnly", {}>, Schema.TaggedStruct<"IfMatch", {
|
|
26
|
+
readonly etag: Schema.String;
|
|
27
|
+
}>]>>;
|
|
28
|
+
readonly contentLength: Schema.optional<Schema.Natural>;
|
|
29
|
+
readonly maxBytes: Schema.optional<Schema.Natural>;
|
|
30
|
+
}>;
|
|
31
|
+
export type PutRequest<E = never, R = never> = Omit<typeof PutRequest.Type, "body"> & {
|
|
32
|
+
readonly body: UploadBody<E, R>;
|
|
33
|
+
};
|
|
34
|
+
declare const Target: Schema.Union<readonly [Schema.Struct<{
|
|
35
|
+
readonly key: Schema.NonEmptyString;
|
|
36
|
+
}>, Schema.Struct<{
|
|
37
|
+
readonly ref: Schema.Struct<{
|
|
38
|
+
readonly storeId: Schema.NonEmptyString;
|
|
39
|
+
readonly key: Schema.NonEmptyString;
|
|
40
|
+
readonly version: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"S3Version", {
|
|
41
|
+
readonly id: Schema.NonEmptyString;
|
|
42
|
+
}>, Schema.TaggedStruct<"GcsGeneration", {
|
|
43
|
+
readonly id: Schema.NonEmptyString;
|
|
44
|
+
readonly metageneration: Schema.optional<Schema.NonEmptyString>;
|
|
45
|
+
}>, Schema.TaggedStruct<"AzureVersion", {
|
|
46
|
+
readonly id: Schema.NonEmptyString;
|
|
47
|
+
}>, Schema.TaggedStruct<"AzureSnapshot", {
|
|
48
|
+
readonly id: Schema.NonEmptyString;
|
|
49
|
+
}>, Schema.TaggedStruct<"OpaqueVersion", {
|
|
50
|
+
readonly provider: Schema.NonEmptyString;
|
|
51
|
+
readonly id: Schema.NonEmptyString;
|
|
52
|
+
}>]>>;
|
|
53
|
+
}>;
|
|
54
|
+
}>]>;
|
|
55
|
+
export type ObjectTarget = typeof Target.Type;
|
|
56
|
+
export declare const HeadRequest: Schema.Union<readonly [Schema.Struct<{
|
|
57
|
+
readonly key: Schema.NonEmptyString;
|
|
58
|
+
}>, Schema.Struct<{
|
|
59
|
+
readonly ref: Schema.Struct<{
|
|
60
|
+
readonly storeId: Schema.NonEmptyString;
|
|
61
|
+
readonly key: Schema.NonEmptyString;
|
|
62
|
+
readonly version: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"S3Version", {
|
|
63
|
+
readonly id: Schema.NonEmptyString;
|
|
64
|
+
}>, Schema.TaggedStruct<"GcsGeneration", {
|
|
65
|
+
readonly id: Schema.NonEmptyString;
|
|
66
|
+
readonly metageneration: Schema.optional<Schema.NonEmptyString>;
|
|
67
|
+
}>, Schema.TaggedStruct<"AzureVersion", {
|
|
68
|
+
readonly id: Schema.NonEmptyString;
|
|
69
|
+
}>, Schema.TaggedStruct<"AzureSnapshot", {
|
|
70
|
+
readonly id: Schema.NonEmptyString;
|
|
71
|
+
}>, Schema.TaggedStruct<"OpaqueVersion", {
|
|
72
|
+
readonly provider: Schema.NonEmptyString;
|
|
73
|
+
readonly id: Schema.NonEmptyString;
|
|
74
|
+
}>]>>;
|
|
75
|
+
}>;
|
|
76
|
+
}>]>;
|
|
77
|
+
export type HeadRequest = ObjectTarget;
|
|
78
|
+
export declare const GetRequest: Schema.Union<readonly [Schema.Struct<{
|
|
79
|
+
readonly key: Schema.NonEmptyString;
|
|
80
|
+
readonly range: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"Bounded", {
|
|
81
|
+
readonly start: Schema.Natural;
|
|
82
|
+
readonly end: Schema.Natural;
|
|
83
|
+
}>, Schema.TaggedStruct<"From", {
|
|
84
|
+
readonly start: Schema.Natural;
|
|
85
|
+
}>, Schema.TaggedStruct<"Suffix", {
|
|
86
|
+
readonly length: Schema.Int;
|
|
87
|
+
}>]>>;
|
|
88
|
+
readonly condition: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"IfMatch", {
|
|
89
|
+
readonly etag: Schema.String;
|
|
90
|
+
}>, Schema.TaggedStruct<"IfNoneMatch", {
|
|
91
|
+
readonly etag: Schema.String;
|
|
92
|
+
}>]>>;
|
|
93
|
+
}>, Schema.Struct<{
|
|
94
|
+
readonly ref: Schema.Struct<{
|
|
95
|
+
readonly storeId: Schema.NonEmptyString;
|
|
96
|
+
readonly key: Schema.NonEmptyString;
|
|
97
|
+
readonly version: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"S3Version", {
|
|
98
|
+
readonly id: Schema.NonEmptyString;
|
|
99
|
+
}>, Schema.TaggedStruct<"GcsGeneration", {
|
|
100
|
+
readonly id: Schema.NonEmptyString;
|
|
101
|
+
readonly metageneration: Schema.optional<Schema.NonEmptyString>;
|
|
102
|
+
}>, Schema.TaggedStruct<"AzureVersion", {
|
|
103
|
+
readonly id: Schema.NonEmptyString;
|
|
104
|
+
}>, Schema.TaggedStruct<"AzureSnapshot", {
|
|
105
|
+
readonly id: Schema.NonEmptyString;
|
|
106
|
+
}>, Schema.TaggedStruct<"OpaqueVersion", {
|
|
107
|
+
readonly provider: Schema.NonEmptyString;
|
|
108
|
+
readonly id: Schema.NonEmptyString;
|
|
109
|
+
}>]>>;
|
|
110
|
+
}>;
|
|
111
|
+
readonly range: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"Bounded", {
|
|
112
|
+
readonly start: Schema.Natural;
|
|
113
|
+
readonly end: Schema.Natural;
|
|
114
|
+
}>, Schema.TaggedStruct<"From", {
|
|
115
|
+
readonly start: Schema.Natural;
|
|
116
|
+
}>, Schema.TaggedStruct<"Suffix", {
|
|
117
|
+
readonly length: Schema.Int;
|
|
118
|
+
}>]>>;
|
|
119
|
+
readonly condition: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"IfMatch", {
|
|
120
|
+
readonly etag: Schema.String;
|
|
121
|
+
}>, Schema.TaggedStruct<"IfNoneMatch", {
|
|
122
|
+
readonly etag: Schema.String;
|
|
123
|
+
}>]>>;
|
|
124
|
+
}>]>;
|
|
125
|
+
export type GetRequest = typeof GetRequest.Type;
|
|
126
|
+
export declare const DeleteRequest: Schema.Union<readonly [Schema.Struct<{
|
|
127
|
+
readonly key: Schema.NonEmptyString;
|
|
128
|
+
readonly condition: Schema.optional<Schema.TaggedStruct<"IfMatch", {
|
|
129
|
+
readonly etag: Schema.String;
|
|
130
|
+
}>>;
|
|
131
|
+
}>, Schema.Struct<{
|
|
132
|
+
readonly ref: Schema.Struct<{
|
|
133
|
+
readonly storeId: Schema.NonEmptyString;
|
|
134
|
+
readonly key: Schema.NonEmptyString;
|
|
135
|
+
readonly version: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"S3Version", {
|
|
136
|
+
readonly id: Schema.NonEmptyString;
|
|
137
|
+
}>, Schema.TaggedStruct<"GcsGeneration", {
|
|
138
|
+
readonly id: Schema.NonEmptyString;
|
|
139
|
+
readonly metageneration: Schema.optional<Schema.NonEmptyString>;
|
|
140
|
+
}>, Schema.TaggedStruct<"AzureVersion", {
|
|
141
|
+
readonly id: Schema.NonEmptyString;
|
|
142
|
+
}>, Schema.TaggedStruct<"AzureSnapshot", {
|
|
143
|
+
readonly id: Schema.NonEmptyString;
|
|
144
|
+
}>, Schema.TaggedStruct<"OpaqueVersion", {
|
|
145
|
+
readonly provider: Schema.NonEmptyString;
|
|
146
|
+
readonly id: Schema.NonEmptyString;
|
|
147
|
+
}>]>>;
|
|
148
|
+
}>;
|
|
149
|
+
readonly condition: Schema.optional<Schema.TaggedStruct<"IfMatch", {
|
|
150
|
+
readonly etag: Schema.String;
|
|
151
|
+
}>>;
|
|
152
|
+
}>]>;
|
|
153
|
+
export type DeleteRequest = typeof DeleteRequest.Type;
|
|
154
|
+
export declare const ListRequest: Schema.Struct<{
|
|
155
|
+
readonly prefix: Schema.optional<Schema.String>;
|
|
156
|
+
readonly delimiter: Schema.optional<Schema.NonEmptyString>;
|
|
157
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
158
|
+
readonly cursor: Schema.optional<Schema.NonEmptyString>;
|
|
159
|
+
}>;
|
|
160
|
+
export type ListRequest = typeof ListRequest.Type;
|
|
161
|
+
export interface ObjectDownload {
|
|
162
|
+
readonly _tag: "Object";
|
|
163
|
+
readonly metadata: ObjectMetadata;
|
|
164
|
+
readonly contentLength?: number | undefined;
|
|
165
|
+
readonly range?: ResolvedRange | undefined;
|
|
166
|
+
readonly body: Stream.Stream<Uint8Array, StorageError, Scope.Scope>;
|
|
167
|
+
}
|
|
168
|
+
export interface NotModified {
|
|
169
|
+
readonly _tag: "NotModified";
|
|
170
|
+
readonly metadata: ObjectMetadata;
|
|
171
|
+
}
|
|
172
|
+
export type GetResult = ObjectDownload | NotModified;
|
|
173
|
+
export type ListEntry = {
|
|
174
|
+
readonly _tag: "Object";
|
|
175
|
+
readonly metadata: ObjectMetadata;
|
|
176
|
+
} | {
|
|
177
|
+
readonly _tag: "CommonPrefix";
|
|
178
|
+
readonly prefix: string;
|
|
179
|
+
};
|
|
180
|
+
export interface ListPage {
|
|
181
|
+
readonly entries: ReadonlyArray<ListEntry>;
|
|
182
|
+
readonly cursor?: string | undefined;
|
|
183
|
+
}
|
|
184
|
+
export {};
|
|
185
|
+
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ObjectHeaders, ObjectKey, ObjectRef, ObjectSize, ObjectValidator } from "./object.js";
|
|
2
|
+
import { ByteRange } from "./ranges.js";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
|
|
5
|
+
// src/core/requests.ts
|
|
6
|
+
const WriteCondition = Schema.Union([Schema.TaggedStruct("CreateOnly", {}), Schema.TaggedStruct("IfMatch", { etag: ObjectValidator })]);
|
|
7
|
+
const ReadCondition = Schema.Union([Schema.TaggedStruct("IfMatch", { etag: ObjectValidator }), Schema.TaggedStruct("IfNoneMatch", { etag: ObjectValidator })]);
|
|
8
|
+
const PutRequest = Schema.Struct({
|
|
9
|
+
...ObjectHeaders.fields,
|
|
10
|
+
key: ObjectKey,
|
|
11
|
+
body: Schema.Unknown,
|
|
12
|
+
condition: Schema.optional(WriteCondition),
|
|
13
|
+
contentLength: Schema.optional(ObjectSize),
|
|
14
|
+
maxBytes: Schema.optional(ObjectSize)
|
|
15
|
+
});
|
|
16
|
+
const Target = Schema.Union([Schema.Struct({ key: ObjectKey }), Schema.Struct({ ref: ObjectRef })]);
|
|
17
|
+
const HeadRequest = Target;
|
|
18
|
+
const GetRequest = Schema.Union([Schema.Struct({
|
|
19
|
+
key: ObjectKey,
|
|
20
|
+
range: Schema.optional(ByteRange),
|
|
21
|
+
condition: Schema.optional(ReadCondition)
|
|
22
|
+
}), Schema.Struct({
|
|
23
|
+
ref: ObjectRef,
|
|
24
|
+
range: Schema.optional(ByteRange),
|
|
25
|
+
condition: Schema.optional(ReadCondition)
|
|
26
|
+
})]);
|
|
27
|
+
const DeleteRequest = Schema.Union([Schema.Struct({
|
|
28
|
+
key: ObjectKey,
|
|
29
|
+
condition: Schema.optional(Schema.TaggedStruct("IfMatch", { etag: ObjectValidator }))
|
|
30
|
+
}), Schema.Struct({
|
|
31
|
+
ref: ObjectRef,
|
|
32
|
+
condition: Schema.optional(Schema.TaggedStruct("IfMatch", { etag: ObjectValidator }))
|
|
33
|
+
})]);
|
|
34
|
+
const ListRequest = Schema.Struct({
|
|
35
|
+
prefix: Schema.optional(Schema.String),
|
|
36
|
+
delimiter: Schema.optional(Schema.NonEmptyString),
|
|
37
|
+
limit: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
38
|
+
cursor: Schema.optional(Schema.NonEmptyString)
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { DeleteRequest, GetRequest, HeadRequest, ListRequest, PutRequest, ReadCondition, WriteCondition };
|
|
42
|
+
//# sourceMappingURL=requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.js","names":[],"sources":["../../src/core/requests.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport type { Scope, Stream } from \"effect\";\n\nimport type { StorageError } from \"./errors.js\";\nimport type { ObjectMetadata } from \"./object.js\";\nimport { ObjectHeaders, ObjectKey, ObjectRef, ObjectSize, ObjectValidator } from \"./object.js\";\nimport { ByteRange } from \"./ranges.js\";\nimport type { ResolvedRange } from \"./ranges.js\";\n\nexport const WriteCondition = Schema.Union([\n Schema.TaggedStruct(\"CreateOnly\", {}),\n Schema.TaggedStruct(\"IfMatch\", { etag: ObjectValidator }),\n]);\n\nexport type WriteCondition = typeof WriteCondition.Type;\n\nexport const ReadCondition = Schema.Union([\n Schema.TaggedStruct(\"IfMatch\", { etag: ObjectValidator }),\n Schema.TaggedStruct(\"IfNoneMatch\", { etag: ObjectValidator }),\n]);\n\nexport type ReadCondition = typeof ReadCondition.Type;\n\nexport type UploadBody<E = never, R = never> = Uint8Array | Stream.Stream<Uint8Array, E, R>;\n\nexport const PutRequest = Schema.Struct({\n ...ObjectHeaders.fields,\n key: ObjectKey,\n body: Schema.Unknown,\n condition: Schema.optional(WriteCondition),\n contentLength: Schema.optional(ObjectSize),\n maxBytes: Schema.optional(ObjectSize),\n});\n\nexport type PutRequest<E = never, R = never> = Omit<typeof PutRequest.Type, \"body\"> & {\n readonly body: UploadBody<E, R>;\n};\n\nconst Target = Schema.Union([Schema.Struct({ key: ObjectKey }), Schema.Struct({ ref: ObjectRef })]);\n\nexport type ObjectTarget = typeof Target.Type;\nexport const HeadRequest = Target;\nexport type HeadRequest = ObjectTarget;\n\nexport const GetRequest = Schema.Union([\n Schema.Struct({\n key: ObjectKey,\n range: Schema.optional(ByteRange),\n condition: Schema.optional(ReadCondition),\n }),\n Schema.Struct({\n ref: ObjectRef,\n range: Schema.optional(ByteRange),\n condition: Schema.optional(ReadCondition),\n }),\n]);\n\nexport type GetRequest = typeof GetRequest.Type;\n\nexport const DeleteRequest = Schema.Union([\n Schema.Struct({\n key: ObjectKey,\n condition: Schema.optional(Schema.TaggedStruct(\"IfMatch\", { etag: ObjectValidator })),\n }),\n Schema.Struct({\n ref: ObjectRef,\n condition: Schema.optional(Schema.TaggedStruct(\"IfMatch\", { etag: ObjectValidator })),\n }),\n]);\n\nexport type DeleteRequest = typeof DeleteRequest.Type;\n\nexport const ListRequest = Schema.Struct({\n prefix: Schema.optional(Schema.String),\n delimiter: Schema.optional(Schema.NonEmptyString),\n limit: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),\n cursor: Schema.optional(Schema.NonEmptyString),\n});\n\nexport type ListRequest = typeof ListRequest.Type;\n\nexport interface ObjectDownload {\n readonly _tag: \"Object\";\n readonly metadata: ObjectMetadata;\n readonly contentLength?: number | undefined;\n readonly range?: ResolvedRange | undefined;\n readonly body: Stream.Stream<Uint8Array, StorageError, Scope.Scope>;\n}\n\nexport interface NotModified {\n readonly _tag: \"NotModified\";\n readonly metadata: ObjectMetadata;\n}\n\nexport type GetResult = ObjectDownload | NotModified;\n\nexport type ListEntry =\n | { readonly _tag: \"Object\"; readonly metadata: ObjectMetadata }\n | { readonly _tag: \"CommonPrefix\"; readonly prefix: string };\n\nexport interface ListPage {\n readonly entries: ReadonlyArray<ListEntry>;\n readonly cursor?: string | undefined;\n}\n"],"mappings":";;;;;AASA,MAAa,iBAAiB,OAAO,MAAM,CACzC,OAAO,aAAa,cAAc,CAAC,CAAC,GACpC,OAAO,aAAa,WAAW,EAAE,MAAM,gBAAgB,CAAC,CAC1D,CAAC;AAID,MAAa,gBAAgB,OAAO,MAAM,CACxC,OAAO,aAAa,WAAW,EAAE,MAAM,gBAAgB,CAAC,GACxD,OAAO,aAAa,eAAe,EAAE,MAAM,gBAAgB,CAAC,CAC9D,CAAC;AAMD,MAAa,aAAa,OAAO,OAAO;CACtC,GAAG,cAAc;CACjB,KAAK;CACL,MAAM,OAAO;CACb,WAAW,OAAO,SAAS,cAAc;CACzC,eAAe,OAAO,SAAS,UAAU;CACzC,UAAU,OAAO,SAAS,UAAU;AACtC,CAAC;AAMD,MAAM,SAAS,OAAO,MAAM,CAAC,OAAO,OAAO,EAAE,KAAK,UAAU,CAAC,GAAG,OAAO,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC;AAGlG,MAAa,cAAc;AAG3B,MAAa,aAAa,OAAO,MAAM,CACrC,OAAO,OAAO;CACZ,KAAK;CACL,OAAO,OAAO,SAAS,SAAS;CAChC,WAAW,OAAO,SAAS,aAAa;AAC1C,CAAC,GACD,OAAO,OAAO;CACZ,KAAK;CACL,OAAO,OAAO,SAAS,SAAS;CAChC,WAAW,OAAO,SAAS,aAAa;AAC1C,CAAC,CACH,CAAC;AAID,MAAa,gBAAgB,OAAO,MAAM,CACxC,OAAO,OAAO;CACZ,KAAK;CACL,WAAW,OAAO,SAAS,OAAO,aAAa,WAAW,EAAE,MAAM,gBAAgB,CAAC,CAAC;AACtF,CAAC,GACD,OAAO,OAAO;CACZ,KAAK;CACL,WAAW,OAAO,SAAS,OAAO,aAAa,WAAW,EAAE,MAAM,gBAAgB,CAAC,CAAC;AACtF,CAAC,CACH,CAAC;AAID,MAAa,cAAc,OAAO,OAAO;CACvC,QAAQ,OAAO,SAAS,OAAO,MAAM;CACrC,WAAW,OAAO,SAAS,OAAO,cAAc;CAChD,OAAO,OAAO,SAAS,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,CAAC;CAChE,QAAQ,OAAO,SAAS,OAAO,cAAc;AAC/C,CAAC"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { ObjectMetadata } from "./object.js";
|
|
2
|
+
import { StorageError } from "./errors.js";
|
|
3
|
+
import { DeleteRequest, GetRequest, GetResult, HeadRequest, ListEntry, ListPage, ListRequest, PutRequest } from "./requests.js";
|
|
4
|
+
import { StorageCapabilities } from "./capabilities.js";
|
|
5
|
+
import { Context, Effect, Scope, Stream } from "effect";
|
|
6
|
+
export interface StorageService {
|
|
7
|
+
readonly provider: string;
|
|
8
|
+
readonly storeId: string;
|
|
9
|
+
readonly capabilities: StorageCapabilities;
|
|
10
|
+
readonly put: <E = never, R = never>(request: PutRequest<E, R>) => Effect.Effect<ObjectMetadata, StorageError | E, R>;
|
|
11
|
+
readonly get: (request: GetRequest) => Effect.Effect<GetResult, StorageError, Scope.Scope>;
|
|
12
|
+
readonly head: (request: HeadRequest) => Effect.Effect<ObjectMetadata, StorageError>;
|
|
13
|
+
readonly delete: (request: DeleteRequest) => Effect.Effect<void, StorageError>;
|
|
14
|
+
readonly listPage: (request?: ListRequest) => Effect.Effect<ListPage, StorageError>;
|
|
15
|
+
}
|
|
16
|
+
declare const Storage_base: Context.ServiceClass<Storage, "@effect-kit/storage/Storage", StorageService>;
|
|
17
|
+
export declare class Storage extends Storage_base {
|
|
18
|
+
/** Guards request boundaries and ties returned bodies to their acquisition scope. */
|
|
19
|
+
static make(service: StorageService): StorageService;
|
|
20
|
+
static readonly exists: (request: {
|
|
21
|
+
readonly key: string;
|
|
22
|
+
} | {
|
|
23
|
+
readonly ref: {
|
|
24
|
+
readonly storeId: string;
|
|
25
|
+
readonly key: string;
|
|
26
|
+
readonly version?: {
|
|
27
|
+
readonly _tag: "S3Version";
|
|
28
|
+
readonly id: string;
|
|
29
|
+
} | {
|
|
30
|
+
readonly _tag: "GcsGeneration";
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly metageneration?: string | undefined;
|
|
33
|
+
} | {
|
|
34
|
+
readonly _tag: "AzureVersion";
|
|
35
|
+
readonly id: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly _tag: "AzureSnapshot";
|
|
38
|
+
readonly id: string;
|
|
39
|
+
} | {
|
|
40
|
+
readonly _tag: "OpaqueVersion";
|
|
41
|
+
readonly provider: string;
|
|
42
|
+
readonly id: string;
|
|
43
|
+
} | undefined;
|
|
44
|
+
};
|
|
45
|
+
}) => Effect.Effect<boolean, StorageError, Storage>;
|
|
46
|
+
static readonly getBytes: (request: ({
|
|
47
|
+
readonly key: string;
|
|
48
|
+
readonly range?: {
|
|
49
|
+
readonly _tag: "Bounded";
|
|
50
|
+
readonly start: number;
|
|
51
|
+
readonly end: number;
|
|
52
|
+
} | {
|
|
53
|
+
readonly _tag: "From";
|
|
54
|
+
readonly start: number;
|
|
55
|
+
} | {
|
|
56
|
+
readonly _tag: "Suffix";
|
|
57
|
+
readonly length: number;
|
|
58
|
+
} | undefined;
|
|
59
|
+
readonly condition?: {
|
|
60
|
+
readonly _tag: "IfMatch";
|
|
61
|
+
readonly etag: string;
|
|
62
|
+
} | {
|
|
63
|
+
readonly _tag: "IfNoneMatch";
|
|
64
|
+
readonly etag: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
readonly ref: {
|
|
68
|
+
readonly storeId: string;
|
|
69
|
+
readonly key: string;
|
|
70
|
+
readonly version?: {
|
|
71
|
+
readonly _tag: "S3Version";
|
|
72
|
+
readonly id: string;
|
|
73
|
+
} | {
|
|
74
|
+
readonly _tag: "GcsGeneration";
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly metageneration?: string | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
readonly _tag: "AzureVersion";
|
|
79
|
+
readonly id: string;
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "AzureSnapshot";
|
|
82
|
+
readonly id: string;
|
|
83
|
+
} | {
|
|
84
|
+
readonly _tag: "OpaqueVersion";
|
|
85
|
+
readonly provider: string;
|
|
86
|
+
readonly id: string;
|
|
87
|
+
} | undefined;
|
|
88
|
+
};
|
|
89
|
+
readonly range?: {
|
|
90
|
+
readonly _tag: "Bounded";
|
|
91
|
+
readonly start: number;
|
|
92
|
+
readonly end: number;
|
|
93
|
+
} | {
|
|
94
|
+
readonly _tag: "From";
|
|
95
|
+
readonly start: number;
|
|
96
|
+
} | {
|
|
97
|
+
readonly _tag: "Suffix";
|
|
98
|
+
readonly length: number;
|
|
99
|
+
} | undefined;
|
|
100
|
+
readonly condition?: {
|
|
101
|
+
readonly _tag: "IfMatch";
|
|
102
|
+
readonly etag: string;
|
|
103
|
+
} | {
|
|
104
|
+
readonly _tag: "IfNoneMatch";
|
|
105
|
+
readonly etag: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
}) & {
|
|
108
|
+
readonly maxBytes: number;
|
|
109
|
+
}) => Effect.Effect<Uint8Array<ArrayBuffer>, StorageError, Storage>;
|
|
110
|
+
static readonly getText: (request: ({
|
|
111
|
+
readonly key: string;
|
|
112
|
+
readonly range?: {
|
|
113
|
+
readonly _tag: "Bounded";
|
|
114
|
+
readonly start: number;
|
|
115
|
+
readonly end: number;
|
|
116
|
+
} | {
|
|
117
|
+
readonly _tag: "From";
|
|
118
|
+
readonly start: number;
|
|
119
|
+
} | {
|
|
120
|
+
readonly _tag: "Suffix";
|
|
121
|
+
readonly length: number;
|
|
122
|
+
} | undefined;
|
|
123
|
+
readonly condition?: {
|
|
124
|
+
readonly _tag: "IfMatch";
|
|
125
|
+
readonly etag: string;
|
|
126
|
+
} | {
|
|
127
|
+
readonly _tag: "IfNoneMatch";
|
|
128
|
+
readonly etag: string;
|
|
129
|
+
} | undefined;
|
|
130
|
+
} | {
|
|
131
|
+
readonly ref: {
|
|
132
|
+
readonly storeId: string;
|
|
133
|
+
readonly key: string;
|
|
134
|
+
readonly version?: {
|
|
135
|
+
readonly _tag: "S3Version";
|
|
136
|
+
readonly id: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly _tag: "GcsGeneration";
|
|
139
|
+
readonly id: string;
|
|
140
|
+
readonly metageneration?: string | undefined;
|
|
141
|
+
} | {
|
|
142
|
+
readonly _tag: "AzureVersion";
|
|
143
|
+
readonly id: string;
|
|
144
|
+
} | {
|
|
145
|
+
readonly _tag: "AzureSnapshot";
|
|
146
|
+
readonly id: string;
|
|
147
|
+
} | {
|
|
148
|
+
readonly _tag: "OpaqueVersion";
|
|
149
|
+
readonly provider: string;
|
|
150
|
+
readonly id: string;
|
|
151
|
+
} | undefined;
|
|
152
|
+
};
|
|
153
|
+
readonly range?: {
|
|
154
|
+
readonly _tag: "Bounded";
|
|
155
|
+
readonly start: number;
|
|
156
|
+
readonly end: number;
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "From";
|
|
159
|
+
readonly start: number;
|
|
160
|
+
} | {
|
|
161
|
+
readonly _tag: "Suffix";
|
|
162
|
+
readonly length: number;
|
|
163
|
+
} | undefined;
|
|
164
|
+
readonly condition?: {
|
|
165
|
+
readonly _tag: "IfMatch";
|
|
166
|
+
readonly etag: string;
|
|
167
|
+
} | {
|
|
168
|
+
readonly _tag: "IfNoneMatch";
|
|
169
|
+
readonly etag: string;
|
|
170
|
+
} | undefined;
|
|
171
|
+
}) & {
|
|
172
|
+
readonly maxBytes: number;
|
|
173
|
+
}) => Effect.Effect<string, StorageError, Storage>;
|
|
174
|
+
static list(request?: ListRequest): Stream.Stream<ListEntry, StorageError, Storage>;
|
|
175
|
+
static readonly deleteMany: (requests: readonly ({
|
|
176
|
+
readonly key: string;
|
|
177
|
+
readonly condition?: {
|
|
178
|
+
readonly _tag: "IfMatch";
|
|
179
|
+
readonly etag: string;
|
|
180
|
+
} | undefined;
|
|
181
|
+
} | {
|
|
182
|
+
readonly ref: {
|
|
183
|
+
readonly storeId: string;
|
|
184
|
+
readonly key: string;
|
|
185
|
+
readonly version?: {
|
|
186
|
+
readonly _tag: "S3Version";
|
|
187
|
+
readonly id: string;
|
|
188
|
+
} | {
|
|
189
|
+
readonly _tag: "GcsGeneration";
|
|
190
|
+
readonly id: string;
|
|
191
|
+
readonly metageneration?: string | undefined;
|
|
192
|
+
} | {
|
|
193
|
+
readonly _tag: "AzureVersion";
|
|
194
|
+
readonly id: string;
|
|
195
|
+
} | {
|
|
196
|
+
readonly _tag: "AzureSnapshot";
|
|
197
|
+
readonly id: string;
|
|
198
|
+
} | {
|
|
199
|
+
readonly _tag: "OpaqueVersion";
|
|
200
|
+
readonly provider: string;
|
|
201
|
+
readonly id: string;
|
|
202
|
+
} | undefined;
|
|
203
|
+
};
|
|
204
|
+
readonly condition?: {
|
|
205
|
+
readonly _tag: "IfMatch";
|
|
206
|
+
readonly etag: string;
|
|
207
|
+
} | undefined;
|
|
208
|
+
})[], options?: {
|
|
209
|
+
readonly concurrency?: number;
|
|
210
|
+
} | undefined) => Effect.Effect<{
|
|
211
|
+
request: {
|
|
212
|
+
readonly key: string;
|
|
213
|
+
readonly condition?: {
|
|
214
|
+
readonly _tag: "IfMatch";
|
|
215
|
+
readonly etag: string;
|
|
216
|
+
} | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
readonly ref: {
|
|
219
|
+
readonly storeId: string;
|
|
220
|
+
readonly key: string;
|
|
221
|
+
readonly version?: {
|
|
222
|
+
readonly _tag: "S3Version";
|
|
223
|
+
readonly id: string;
|
|
224
|
+
} | {
|
|
225
|
+
readonly _tag: "GcsGeneration";
|
|
226
|
+
readonly id: string;
|
|
227
|
+
readonly metageneration?: string | undefined;
|
|
228
|
+
} | {
|
|
229
|
+
readonly _tag: "AzureVersion";
|
|
230
|
+
readonly id: string;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _tag: "AzureSnapshot";
|
|
233
|
+
readonly id: string;
|
|
234
|
+
} | {
|
|
235
|
+
readonly _tag: "OpaqueVersion";
|
|
236
|
+
readonly provider: string;
|
|
237
|
+
readonly id: string;
|
|
238
|
+
} | undefined;
|
|
239
|
+
};
|
|
240
|
+
readonly condition?: {
|
|
241
|
+
readonly _tag: "IfMatch";
|
|
242
|
+
readonly etag: string;
|
|
243
|
+
} | undefined;
|
|
244
|
+
};
|
|
245
|
+
result: import("effect/Result").Result<void, StorageError>;
|
|
246
|
+
}[], StorageError, Storage>;
|
|
247
|
+
}
|
|
248
|
+
export {};
|
|
249
|
+
//# sourceMappingURL=storage.d.ts.map
|