@backblaze-labs/b2-sdk 0.2.0 → 0.4.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 +86 -1
- package/README.md +38 -7
- package/dist/_virtual/_b2-sdk-version-json.cjs +1 -1
- package/dist/_virtual/_b2-sdk-version-json.js +1 -1
- package/dist/auth/file.cjs.map +1 -1
- package/dist/auth/reauth-coalescer.cjs +65 -0
- package/dist/auth/reauth-coalescer.cjs.map +1 -0
- package/dist/auth/reauth-coalescer.d.cts +34 -0
- package/dist/auth/reauth-coalescer.d.cts.map +1 -0
- package/dist/auth/reauth-coalescer.d.ts +34 -0
- package/dist/auth/reauth-coalescer.d.ts.map +1 -0
- package/dist/auth/reauth-coalescer.js +65 -0
- package/dist/auth/reauth-coalescer.js.map +1 -0
- package/dist/backup/client.cjs +206 -0
- package/dist/backup/client.cjs.map +1 -0
- package/dist/backup/client.d.cts +238 -0
- package/dist/backup/client.d.cts.map +1 -0
- package/dist/backup/client.d.ts +238 -0
- package/dist/backup/client.d.ts.map +1 -0
- package/dist/backup/client.js +206 -0
- package/dist/backup/client.js.map +1 -0
- package/dist/backup/index.cjs +15 -0
- package/dist/backup/index.d.cts +22 -0
- package/dist/backup/index.d.cts.map +1 -0
- package/dist/backup/index.d.ts +22 -0
- package/dist/backup/index.d.ts.map +1 -0
- package/dist/backup/index.js +7 -0
- package/dist/backup/raw.cjs +168 -0
- package/dist/backup/raw.cjs.map +1 -0
- package/dist/backup/raw.d.cts +122 -0
- package/dist/backup/raw.d.cts.map +1 -0
- package/dist/backup/raw.d.ts +122 -0
- package/dist/backup/raw.d.ts.map +1 -0
- package/dist/backup/raw.js +168 -0
- package/dist/backup/raw.js.map +1 -0
- package/dist/bucket-validation.cjs +111 -0
- package/dist/bucket-validation.cjs.map +1 -0
- package/dist/bucket-validation.d.cts +27 -0
- package/dist/bucket-validation.d.cts.map +1 -0
- package/dist/bucket-validation.d.ts +27 -0
- package/dist/bucket-validation.d.ts.map +1 -0
- package/dist/bucket-validation.js +109 -0
- package/dist/bucket-validation.js.map +1 -0
- package/dist/bucket.cjs +125 -74
- package/dist/bucket.cjs.map +1 -1
- package/dist/bucket.d.cts +156 -61
- package/dist/bucket.d.cts.map +1 -1
- package/dist/bucket.d.ts +156 -61
- package/dist/bucket.d.ts.map +1 -1
- package/dist/bucket.js +125 -74
- package/dist/bucket.js.map +1 -1
- package/dist/client.cjs +29 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +30 -9
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.ts +30 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +29 -8
- package/dist/client.js.map +1 -1
- package/dist/copy/large.cjs +5 -3
- package/dist/copy/large.cjs.map +1 -1
- package/dist/copy/large.d.cts.map +1 -1
- package/dist/copy/large.d.ts.map +1 -1
- package/dist/copy/large.js +5 -3
- package/dist/copy/large.js.map +1 -1
- package/dist/download/checksum.cjs +6 -2
- package/dist/download/checksum.cjs.map +1 -1
- package/dist/download/checksum.js +6 -2
- package/dist/download/checksum.js.map +1 -1
- package/dist/download/parallel.cjs +52 -15
- package/dist/download/parallel.cjs.map +1 -1
- package/dist/download/parallel.d.cts +8 -1
- package/dist/download/parallel.d.cts.map +1 -1
- package/dist/download/parallel.d.ts +8 -1
- package/dist/download/parallel.d.ts.map +1 -1
- package/dist/download/parallel.js +52 -15
- package/dist/download/parallel.js.map +1 -1
- package/dist/download/single.cjs +179 -19
- package/dist/download/single.cjs.map +1 -1
- package/dist/download/single.d.cts +10 -4
- package/dist/download/single.d.cts.map +1 -1
- package/dist/download/single.d.ts +10 -4
- package/dist/download/single.d.ts.map +1 -1
- package/dist/download/single.js +179 -19
- package/dist/download/single.js.map +1 -1
- package/dist/errors/index.cjs +196 -3
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +134 -0
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +134 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +183 -4
- package/dist/errors/index.js.map +1 -1
- package/dist/http/non-idempotent-mutations.cjs +38 -0
- package/dist/http/non-idempotent-mutations.cjs.map +1 -0
- package/dist/http/non-idempotent-mutations.d.cts +25 -0
- package/dist/http/non-idempotent-mutations.d.cts.map +1 -0
- package/dist/http/non-idempotent-mutations.d.ts +25 -0
- package/dist/http/non-idempotent-mutations.d.ts.map +1 -0
- package/dist/http/non-idempotent-mutations.js +35 -0
- package/dist/http/non-idempotent-mutations.js.map +1 -0
- package/dist/http/retry.cjs +1 -1
- package/dist/http/retry.cjs.map +1 -1
- package/dist/http/retry.js +1 -1
- package/dist/http/retry.js.map +1 -1
- package/dist/http/transport.cjs +62 -23
- package/dist/http/transport.cjs.map +1 -1
- package/dist/http/transport.d.cts +30 -3
- package/dist/http/transport.d.cts.map +1 -1
- package/dist/http/transport.d.ts +30 -3
- package/dist/http/transport.d.ts.map +1 -1
- package/dist/http/transport.js +60 -22
- package/dist/http/transport.js.map +1 -1
- package/dist/http/user-agent.cjs +12 -1
- package/dist/http/user-agent.cjs.map +1 -1
- package/dist/http/user-agent.d.cts +8 -0
- package/dist/http/user-agent.d.cts.map +1 -1
- package/dist/http/user-agent.d.ts +8 -0
- package/dist/http/user-agent.d.ts.map +1 -1
- package/dist/http/user-agent.js +13 -3
- package/dist/http/user-agent.js.map +1 -1
- package/dist/index.cjs +50 -2
- package/dist/index.d.cts +15 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +15 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -10
- package/dist/notifications/index.cjs +3 -0
- package/dist/notifications/index.d.cts +2 -0
- package/dist/notifications/index.d.cts.map +1 -1
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +2 -1
- package/dist/object.cjs +13 -2
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.cts +11 -3
- package/dist/object.d.cts.map +1 -1
- package/dist/object.d.ts +11 -3
- package/dist/object.d.ts.map +1 -1
- package/dist/object.js +13 -2
- package/dist/object.js.map +1 -1
- package/dist/partner/account-info.d.cts +43 -0
- package/dist/partner/account-info.d.cts.map +1 -0
- package/dist/partner/account-info.d.ts +43 -0
- package/dist/partner/account-info.d.ts.map +1 -0
- package/dist/partner/auth-clone.cjs +64 -0
- package/dist/partner/auth-clone.cjs.map +1 -0
- package/dist/partner/auth-clone.d.cts +27 -0
- package/dist/partner/auth-clone.d.cts.map +1 -0
- package/dist/partner/auth-clone.d.ts +27 -0
- package/dist/partner/auth-clone.d.ts.map +1 -0
- package/dist/partner/auth-clone.js +63 -0
- package/dist/partner/auth-clone.js.map +1 -0
- package/dist/partner/auth-core.cjs +156 -0
- package/dist/partner/auth-core.cjs.map +1 -0
- package/dist/partner/auth-core.d.cts +111 -0
- package/dist/partner/auth-core.d.cts.map +1 -0
- package/dist/partner/auth-core.d.ts +111 -0
- package/dist/partner/auth-core.d.ts.map +1 -0
- package/dist/partner/auth-core.js +156 -0
- package/dist/partner/auth-core.js.map +1 -0
- package/dist/partner/auth-shape.cjs +36 -0
- package/dist/partner/auth-shape.cjs.map +1 -0
- package/dist/partner/auth-shape.d.cts +12 -0
- package/dist/partner/auth-shape.d.cts.map +1 -0
- package/dist/partner/auth-shape.d.ts +12 -0
- package/dist/partner/auth-shape.d.ts.map +1 -0
- package/dist/partner/auth-shape.js +36 -0
- package/dist/partner/auth-shape.js.map +1 -0
- package/dist/partner/client.cjs +270 -0
- package/dist/partner/client.cjs.map +1 -0
- package/dist/partner/client.d.cts +357 -0
- package/dist/partner/client.d.cts.map +1 -0
- package/dist/partner/client.d.ts +357 -0
- package/dist/partner/client.d.ts.map +1 -0
- package/dist/partner/client.js +270 -0
- package/dist/partner/client.js.map +1 -0
- package/dist/partner/endpoint-url.cjs +109 -0
- package/dist/partner/endpoint-url.cjs.map +1 -0
- package/dist/partner/endpoint-url.d.cts +74 -0
- package/dist/partner/endpoint-url.d.cts.map +1 -0
- package/dist/partner/endpoint-url.d.ts +74 -0
- package/dist/partner/endpoint-url.d.ts.map +1 -0
- package/dist/partner/endpoint-url.js +106 -0
- package/dist/partner/endpoint-url.js.map +1 -0
- package/dist/partner/in-memory.cjs +135 -0
- package/dist/partner/in-memory.cjs.map +1 -0
- package/dist/partner/in-memory.d.cts +99 -0
- package/dist/partner/in-memory.d.cts.map +1 -0
- package/dist/partner/in-memory.d.ts +99 -0
- package/dist/partner/in-memory.d.ts.map +1 -0
- package/dist/partner/in-memory.js +135 -0
- package/dist/partner/in-memory.js.map +1 -0
- package/dist/partner/index.cjs +27 -0
- package/dist/partner/index.d.cts +32 -0
- package/dist/partner/index.d.cts.map +1 -0
- package/dist/partner/index.d.ts +32 -0
- package/dist/partner/index.d.ts.map +1 -0
- package/dist/partner/index.js +9 -0
- package/dist/partner/raw.cjs +400 -0
- package/dist/partner/raw.cjs.map +1 -0
- package/dist/partner/raw.d.cts +220 -0
- package/dist/partner/raw.d.cts.map +1 -0
- package/dist/partner/raw.d.ts +220 -0
- package/dist/partner/raw.d.ts.map +1 -0
- package/dist/partner/raw.js +398 -0
- package/dist/partner/raw.js.map +1 -0
- package/dist/partner/redaction-placeholders.cjs +10 -0
- package/dist/partner/redaction-placeholders.cjs.map +1 -0
- package/dist/partner/redaction-placeholders.d.cts +5 -0
- package/dist/partner/redaction-placeholders.d.cts.map +1 -0
- package/dist/partner/redaction-placeholders.d.ts +5 -0
- package/dist/partner/redaction-placeholders.d.ts.map +1 -0
- package/dist/partner/redaction-placeholders.js +9 -0
- package/dist/partner/redaction-placeholders.js.map +1 -0
- package/dist/partner/redaction.cjs +292 -0
- package/dist/partner/redaction.cjs.map +1 -0
- package/dist/partner/redaction.d.cts +158 -0
- package/dist/partner/redaction.d.cts.map +1 -0
- package/dist/partner/redaction.d.ts +158 -0
- package/dist/partner/redaction.d.ts.map +1 -0
- package/dist/partner/redaction.js +281 -0
- package/dist/partner/redaction.js.map +1 -0
- package/dist/raw/encoding.cjs +29 -10
- package/dist/raw/encoding.cjs.map +1 -1
- package/dist/raw/encoding.d.cts +3 -2
- package/dist/raw/encoding.d.cts.map +1 -1
- package/dist/raw/encoding.d.ts +3 -2
- package/dist/raw/encoding.d.ts.map +1 -1
- package/dist/raw/encoding.js +29 -10
- package/dist/raw/encoding.js.map +1 -1
- package/dist/raw/index.cjs +131 -44
- package/dist/raw/index.cjs.map +1 -1
- package/dist/raw/index.d.cts +21 -15
- package/dist/raw/index.d.cts.map +1 -1
- package/dist/raw/index.d.ts +21 -15
- package/dist/raw/index.d.ts.map +1 -1
- package/dist/raw/index.js +114 -45
- package/dist/raw/index.js.map +1 -1
- package/dist/raw/url.cjs +111 -0
- package/dist/raw/url.cjs.map +1 -0
- package/dist/raw/url.d.cts +41 -0
- package/dist/raw/url.d.cts.map +1 -0
- package/dist/raw/url.d.ts +41 -0
- package/dist/raw/url.d.ts.map +1 -0
- package/dist/raw/url.js +110 -0
- package/dist/raw/url.js.map +1 -0
- package/dist/s3/sigv4.cjs +15 -10
- package/dist/s3/sigv4.cjs.map +1 -1
- package/dist/s3/sigv4.js +15 -10
- package/dist/s3/sigv4.js.map +1 -1
- package/dist/simulator/index.cjs +1579 -257
- package/dist/simulator/index.cjs.map +1 -1
- package/dist/simulator/index.d.cts +124 -11
- package/dist/simulator/index.d.cts.map +1 -1
- package/dist/simulator/index.d.ts +124 -11
- package/dist/simulator/index.d.ts.map +1 -1
- package/dist/simulator/index.js +1568 -262
- package/dist/simulator/index.js.map +1 -1
- package/dist/simulator/partner-capabilities.cjs +77 -0
- package/dist/simulator/partner-capabilities.cjs.map +1 -0
- package/dist/simulator/partner-capabilities.d.cts +53 -0
- package/dist/simulator/partner-capabilities.d.cts.map +1 -0
- package/dist/simulator/partner-capabilities.d.ts +53 -0
- package/dist/simulator/partner-capabilities.d.ts.map +1 -0
- package/dist/simulator/partner-capabilities.js +73 -0
- package/dist/simulator/partner-capabilities.js.map +1 -0
- package/dist/simulator/partner.cjs +713 -0
- package/dist/simulator/partner.cjs.map +1 -0
- package/dist/simulator/partner.d.cts +186 -0
- package/dist/simulator/partner.d.cts.map +1 -0
- package/dist/simulator/partner.d.ts +186 -0
- package/dist/simulator/partner.d.ts.map +1 -0
- package/dist/simulator/partner.js +713 -0
- package/dist/simulator/partner.js.map +1 -0
- package/dist/simulator/validation.cjs +732 -25
- package/dist/simulator/validation.cjs.map +1 -1
- package/dist/simulator/validation.d.cts +145 -6
- package/dist/simulator/validation.d.cts.map +1 -1
- package/dist/simulator/validation.d.ts +145 -6
- package/dist/simulator/validation.d.ts.map +1 -1
- package/dist/simulator/validation.js +705 -26
- package/dist/simulator/validation.js.map +1 -1
- package/dist/streams/file-source.cjs +2 -2
- package/dist/streams/file-source.cjs.map +1 -1
- package/dist/streams/file-source.js +2 -2
- package/dist/streams/file-source.js.map +1 -1
- package/dist/streams/hash.cjs +246 -13
- package/dist/streams/hash.cjs.map +1 -1
- package/dist/streams/hash.d.cts +37 -12
- package/dist/streams/hash.d.cts.map +1 -1
- package/dist/streams/hash.d.ts +37 -12
- package/dist/streams/hash.d.ts.map +1 -1
- package/dist/streams/hash.js +246 -15
- package/dist/streams/hash.js.map +1 -1
- package/dist/streams/index.cjs +3 -1
- package/dist/streams/index.d.cts +1 -1
- package/dist/streams/index.d.cts.map +1 -1
- package/dist/streams/index.d.ts +1 -1
- package/dist/streams/index.d.ts.map +1 -1
- package/dist/streams/index.js +3 -3
- package/dist/streams/progress.cjs +63 -4
- package/dist/streams/progress.cjs.map +1 -1
- package/dist/streams/progress.d.cts +28 -2
- package/dist/streams/progress.d.cts.map +1 -1
- package/dist/streams/progress.d.ts +28 -2
- package/dist/streams/progress.d.ts.map +1 -1
- package/dist/streams/progress.js +63 -4
- package/dist/streams/progress.js.map +1 -1
- package/dist/streams/source.cjs +2 -1
- package/dist/streams/source.cjs.map +1 -1
- package/dist/streams/source.js +2 -1
- package/dist/streams/source.js.map +1 -1
- package/dist/sync/b2-sha1-reader.cjs +6 -2
- package/dist/sync/b2-sha1-reader.cjs.map +1 -1
- package/dist/sync/b2-sha1-reader.d.cts.map +1 -1
- package/dist/sync/b2-sha1-reader.d.ts.map +1 -1
- package/dist/sync/b2-sha1-reader.js +6 -2
- package/dist/sync/b2-sha1-reader.js.map +1 -1
- package/dist/sync/download-staging.cjs +156 -43
- package/dist/sync/download-staging.cjs.map +1 -1
- package/dist/sync/download-staging.d.cts +26 -2
- package/dist/sync/download-staging.d.cts.map +1 -1
- package/dist/sync/download-staging.d.ts +26 -2
- package/dist/sync/download-staging.d.ts.map +1 -1
- package/dist/sync/download-staging.js +155 -44
- package/dist/sync/download-staging.js.map +1 -1
- package/dist/sync/filters.cjs.map +1 -1
- package/dist/sync/filters.js.map +1 -1
- package/dist/sync/index.d.cts +1 -1
- package/dist/sync/index.d.cts.map +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/local-file-io.cjs +15 -6
- package/dist/sync/local-file-io.cjs.map +1 -1
- package/dist/sync/local-file-io.d.cts +3 -0
- package/dist/sync/local-file-io.d.cts.map +1 -1
- package/dist/sync/local-file-io.d.ts +3 -0
- package/dist/sync/local-file-io.d.ts.map +1 -1
- package/dist/sync/local-file-io.js +15 -6
- package/dist/sync/local-file-io.js.map +1 -1
- package/dist/sync/local-sha1.cjs +6 -15
- package/dist/sync/local-sha1.cjs.map +1 -1
- package/dist/sync/local-sha1.d.cts +0 -8
- package/dist/sync/local-sha1.d.cts.map +1 -1
- package/dist/sync/local-sha1.d.ts +0 -8
- package/dist/sync/local-sha1.d.ts.map +1 -1
- package/dist/sync/local-sha1.js +7 -15
- package/dist/sync/local-sha1.js.map +1 -1
- package/dist/sync/pairing.cjs +1 -0
- package/dist/sync/pairing.cjs.map +1 -1
- package/dist/sync/pairing.js +1 -0
- package/dist/sync/pairing.js.map +1 -1
- package/dist/sync/policies/compare.cjs +5 -3
- package/dist/sync/policies/compare.cjs.map +1 -1
- package/dist/sync/policies/compare.d.cts.map +1 -1
- package/dist/sync/policies/compare.d.ts.map +1 -1
- package/dist/sync/policies/compare.js +6 -4
- package/dist/sync/policies/compare.js.map +1 -1
- package/dist/sync/policies/index.cjs +4 -10
- package/dist/sync/policies/index.cjs.map +1 -1
- package/dist/sync/policies/index.js +4 -10
- package/dist/sync/policies/index.js.map +1 -1
- package/dist/sync/scanners/b2.cjs +4 -2
- package/dist/sync/scanners/b2.cjs.map +1 -1
- package/dist/sync/scanners/b2.d.cts.map +1 -1
- package/dist/sync/scanners/b2.d.ts.map +1 -1
- package/dist/sync/scanners/b2.js +4 -2
- package/dist/sync/scanners/b2.js.map +1 -1
- package/dist/sync/scanners/local.cjs +150 -33
- package/dist/sync/scanners/local.cjs.map +1 -1
- package/dist/sync/scanners/local.d.cts +6 -0
- package/dist/sync/scanners/local.d.cts.map +1 -1
- package/dist/sync/scanners/local.d.ts +6 -0
- package/dist/sync/scanners/local.d.ts.map +1 -1
- package/dist/sync/scanners/local.js +150 -33
- package/dist/sync/scanners/local.js.map +1 -1
- package/dist/sync/synchronizer.cjs +79 -31
- package/dist/sync/synchronizer.cjs.map +1 -1
- package/dist/sync/synchronizer.d.cts +1 -0
- package/dist/sync/synchronizer.d.cts.map +1 -1
- package/dist/sync/synchronizer.d.ts +1 -0
- package/dist/sync/synchronizer.d.ts.map +1 -1
- package/dist/sync/synchronizer.js +79 -31
- package/dist/sync/synchronizer.js.map +1 -1
- package/dist/sync/types.d.cts +19 -3
- package/dist/sync/types.d.cts.map +1 -1
- package/dist/sync/types.d.ts +19 -3
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/types/auth.cjs +4 -0
- package/dist/types/auth.cjs.map +1 -1
- package/dist/types/auth.d.cts +4 -0
- package/dist/types/auth.d.cts.map +1 -1
- package/dist/types/auth.d.ts +4 -0
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/auth.js +4 -0
- package/dist/types/auth.js.map +1 -1
- package/dist/types/backup.d.cts +85 -0
- package/dist/types/backup.d.cts.map +1 -0
- package/dist/types/backup.d.ts +85 -0
- package/dist/types/backup.d.ts.map +1 -0
- package/dist/types/bucket.cjs +81 -11
- package/dist/types/bucket.cjs.map +1 -1
- package/dist/types/bucket.d.cts +194 -41
- package/dist/types/bucket.d.cts.map +1 -1
- package/dist/types/bucket.d.ts +194 -41
- package/dist/types/bucket.d.ts.map +1 -1
- package/dist/types/bucket.js +67 -12
- package/dist/types/bucket.js.map +1 -1
- package/dist/types/download.cjs +62 -0
- package/dist/types/download.cjs.map +1 -0
- package/dist/types/download.d.cts +100 -16
- package/dist/types/download.d.cts.map +1 -1
- package/dist/types/download.d.ts +100 -16
- package/dist/types/download.d.ts.map +1 -1
- package/dist/types/download.js +61 -0
- package/dist/types/download.js.map +1 -0
- package/dist/types/encryption.cjs +76 -229
- package/dist/types/encryption.cjs.map +1 -1
- package/dist/types/encryption.d.cts +48 -6
- package/dist/types/encryption.d.cts.map +1 -1
- package/dist/types/encryption.d.ts +48 -6
- package/dist/types/encryption.d.ts.map +1 -1
- package/dist/types/encryption.js +74 -229
- package/dist/types/encryption.js.map +1 -1
- package/dist/types/errors.cjs +9 -0
- package/dist/types/errors.cjs.map +1 -1
- package/dist/types/errors.d.cts +1 -1
- package/dist/types/errors.d.cts.map +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +9 -0
- package/dist/types/errors.js.map +1 -1
- package/dist/types/file.cjs +3 -0
- package/dist/types/file.cjs.map +1 -1
- package/dist/types/file.d.cts +140 -18
- package/dist/types/file.d.cts.map +1 -1
- package/dist/types/file.d.ts +140 -18
- package/dist/types/file.d.ts.map +1 -1
- package/dist/types/file.js +3 -1
- package/dist/types/file.js.map +1 -1
- package/dist/types/ids.cjs +30 -0
- package/dist/types/ids.cjs.map +1 -1
- package/dist/types/ids.d.cts +32 -0
- package/dist/types/ids.d.cts.map +1 -1
- package/dist/types/ids.d.ts +32 -0
- package/dist/types/ids.d.ts.map +1 -1
- package/dist/types/ids.js +28 -1
- package/dist/types/ids.js.map +1 -1
- package/dist/types/index.d.cts +16 -12
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +16 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/key.d.cts +4 -3
- package/dist/types/key.d.cts.map +1 -1
- package/dist/types/key.d.ts +4 -3
- package/dist/types/key.d.ts.map +1 -1
- package/dist/types/lock.cjs.map +1 -1
- package/dist/types/lock.d.cts +14 -0
- package/dist/types/lock.d.cts.map +1 -1
- package/dist/types/lock.d.ts +14 -0
- package/dist/types/lock.d.ts.map +1 -1
- package/dist/types/lock.js.map +1 -1
- package/dist/types/notifications.cjs +31 -1
- package/dist/types/notifications.cjs.map +1 -1
- package/dist/types/notifications.d.cts +31 -4
- package/dist/types/notifications.d.cts.map +1 -1
- package/dist/types/notifications.d.ts +31 -4
- package/dist/types/notifications.d.ts.map +1 -1
- package/dist/types/notifications.js +30 -2
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/partner.cjs +32 -0
- package/dist/types/partner.cjs.map +1 -0
- package/dist/types/partner.d.cts +386 -0
- package/dist/types/partner.d.cts.map +1 -0
- package/dist/types/partner.d.ts +386 -0
- package/dist/types/partner.d.ts.map +1 -0
- package/dist/types/partner.js +29 -0
- package/dist/types/partner.js.map +1 -0
- package/dist/types/upload.d.cts +35 -18
- package/dist/types/upload.d.cts.map +1 -1
- package/dist/types/upload.d.ts +35 -18
- package/dist/types/upload.d.ts.map +1 -1
- package/dist/upload/abort-scope.cjs +0 -45
- package/dist/upload/abort-scope.cjs.map +1 -1
- package/dist/upload/abort-scope.d.cts +0 -22
- package/dist/upload/abort-scope.d.cts.map +1 -1
- package/dist/upload/abort-scope.d.ts +0 -22
- package/dist/upload/abort-scope.d.ts.map +1 -1
- package/dist/upload/abort-scope.js +1 -44
- package/dist/upload/abort-scope.js.map +1 -1
- package/dist/upload/finish.cjs +3 -8
- package/dist/upload/finish.cjs.map +1 -1
- package/dist/upload/finish.d.cts.map +1 -1
- package/dist/upload/finish.d.ts.map +1 -1
- package/dist/upload/finish.js +1 -6
- package/dist/upload/finish.js.map +1 -1
- package/dist/upload/large.cjs +15 -8
- package/dist/upload/large.cjs.map +1 -1
- package/dist/upload/large.d.cts +31 -8
- package/dist/upload/large.d.cts.map +1 -1
- package/dist/upload/large.d.ts +31 -8
- package/dist/upload/large.d.ts.map +1 -1
- package/dist/upload/large.js +15 -8
- package/dist/upload/large.js.map +1 -1
- package/dist/upload/options.cjs.map +1 -1
- package/dist/upload/options.d.cts +24 -0
- package/dist/upload/options.d.cts.map +1 -1
- package/dist/upload/options.d.ts +24 -0
- package/dist/upload/options.d.ts.map +1 -1
- package/dist/upload/options.js.map +1 -1
- package/dist/upload/resume.cjs +6 -4
- package/dist/upload/resume.cjs.map +1 -1
- package/dist/upload/resume.d.cts +9 -5
- package/dist/upload/resume.d.cts.map +1 -1
- package/dist/upload/resume.d.ts +9 -5
- package/dist/upload/resume.d.ts.map +1 -1
- package/dist/upload/resume.js +6 -4
- package/dist/upload/resume.js.map +1 -1
- package/dist/upload/retry.cjs +25 -13
- package/dist/upload/retry.cjs.map +1 -1
- package/dist/upload/retry.d.cts.map +1 -1
- package/dist/upload/retry.d.ts.map +1 -1
- package/dist/upload/retry.js +25 -13
- package/dist/upload/retry.js.map +1 -1
- package/dist/upload/single.cjs +35 -30
- package/dist/upload/single.cjs.map +1 -1
- package/dist/upload/single.d.cts +12 -0
- package/dist/upload/single.d.cts.map +1 -1
- package/dist/upload/single.d.ts +12 -0
- package/dist/upload/single.d.ts.map +1 -1
- package/dist/upload/single.js +35 -30
- package/dist/upload/single.js.map +1 -1
- package/dist/upload/stream.cjs +18 -5
- package/dist/upload/stream.cjs.map +1 -1
- package/dist/upload/stream.d.cts +12 -0
- package/dist/upload/stream.d.cts.map +1 -1
- package/dist/upload/stream.d.ts +12 -0
- package/dist/upload/stream.d.ts.map +1 -1
- package/dist/upload/stream.js +15 -2
- package/dist/upload/stream.js.map +1 -1
- package/dist/util/abort.cjs +114 -0
- package/dist/util/abort.cjs.map +1 -0
- package/dist/util/abort.d.cts +65 -0
- package/dist/util/abort.d.cts.map +1 -0
- package/dist/util/abort.d.ts +65 -0
- package/dist/util/abort.d.ts.map +1 -0
- package/dist/util/abort.js +109 -0
- package/dist/util/abort.js.map +1 -0
- package/dist/util/defaults.cjs +3 -0
- package/dist/util/defaults.cjs.map +1 -1
- package/dist/util/defaults.d.cts +2 -0
- package/dist/util/defaults.d.cts.map +1 -1
- package/dist/util/defaults.d.ts +2 -0
- package/dist/util/defaults.d.ts.map +1 -1
- package/dist/util/defaults.js +3 -1
- package/dist/util/defaults.js.map +1 -1
- package/dist/util/md5.cjs +211 -0
- package/dist/util/md5.cjs.map +1 -0
- package/dist/util/md5.d.cts +43 -0
- package/dist/util/md5.d.cts.map +1 -0
- package/dist/util/md5.d.ts +43 -0
- package/dist/util/md5.d.ts.map +1 -0
- package/dist/util/md5.js +209 -0
- package/dist/util/md5.js.map +1 -0
- package/dist/util/normalize.cjs +5 -5
- package/dist/util/normalize.cjs.map +1 -1
- package/dist/util/normalize.d.cts +7 -7
- package/dist/util/normalize.d.cts.map +1 -1
- package/dist/util/normalize.d.ts +7 -7
- package/dist/util/normalize.d.ts.map +1 -1
- package/dist/util/normalize.js +5 -5
- package/dist/util/normalize.js.map +1 -1
- package/dist/util/paginator.cjs +7 -1
- package/dist/util/paginator.cjs.map +1 -1
- package/dist/util/paginator.d.cts +3 -1
- package/dist/util/paginator.d.cts.map +1 -1
- package/dist/util/paginator.d.ts +3 -1
- package/dist/util/paginator.d.ts.map +1 -1
- package/dist/util/paginator.js +7 -1
- package/dist/util/paginator.js.map +1 -1
- package/dist/version.cjs +56 -4
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +53 -4
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +53 -4
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +52 -5
- package/dist/version.js.map +1 -1
- package/package.json +47 -18
package/dist/types/file.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.cjs","names":[],"sources":["../../src/types/file.ts"],"sourcesContent":["import type { EncryptionSetting, PublicEncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId, FileId } from './ids.ts'\nimport type { FileRetentionValue, LegalHoldValue } from './lock.ts'\n\n/**\n * Named constants for the action that created a file version.\n *\n * @example\n * ```ts\n * if (file.action === FileAction.Hide) { ... }\n * ```\n */\nexport const FileAction = {\n /** Large file upload started but not yet finished. */\n Start: 'start',\n /** Normal upload (small or finished large file). */\n Upload: 'upload',\n /** Hide marker (soft delete). */\n Hide: 'hide',\n /** Virtual folder marker. */\n Folder: 'folder',\n /** Created via server-side copy. */\n Copy: 'copy',\n} as const\n\n/**\n * The action that created a file version. Derived from {@link FileAction}.\n *\n * - `'start'`: large file upload started but not yet finished.\n * - `'upload'`: file was uploaded normally.\n * - `'hide'`: file was hidden (soft-deleted).\n * - `'folder'`: virtual folder marker.\n * - `'copy'`: file was created via server-side copy.\n */\nexport type FileAction = (typeof FileAction)[keyof typeof FileAction]\n\n/**\n * Complete metadata for a single file version in B2.\n * Returned by `b2_get_file_info`, `b2_list_file_names`, `b2_list_file_versions`,\n * `b2_upload_file`, `b2_copy_file`, and other file-related endpoints.\n */\nexport interface FileVersion {\n /** Account that owns this file. */\n readonly accountId: AccountId\n /** Action that created this file version. */\n readonly action: FileAction\n /** Bucket containing this file. */\n readonly bucketId: BucketId\n /** Size of the file content in bytes. */\n readonly contentLength: number\n /** MD5 checksum of the content, or null if not available. */\n readonly contentMd5: string | null\n /** SHA-1 checksum of the content, or null if not available (e.g., large files). */\n readonly contentSha1: string | null\n /** MIME type of the file content. */\n readonly contentType: string\n /** Unique identifier for this file version. */\n readonly fileId: FileId\n /** User-defined key-value metadata stored with the file. */\n readonly fileInfo: Record<string, string>\n /** Full path and name of the file within the bucket. */\n readonly fileName: string\n /** Object Lock retention settings for this file version. */\n readonly fileRetention: {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null if the caller lacks read authorization. */\n readonly value: FileRetentionValue | null\n }\n /** Legal hold status for this file version. */\n readonly legalHold: {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null if the caller lacks read authorization. */\n readonly value: LegalHoldValue | null\n }\n /** Replication status, or null if replication is not configured. */\n readonly replicationStatus: 'pending' | 'completed' | 'failed' | 'replica' | null\n /** Server-side encryption settings applied to this file version. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this version was uploaded. */\n readonly uploadTimestamp: number\n}\n\n/** Request parameters for the `b2_list_file_names` API call. Lists the most recent version of each file in a bucket. */\nexport interface ListFileNamesRequest {\n /** Bucket to list files from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Maximum number of files to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter?: string\n}\n\n/** Response from the `b2_list_file_names` API call. */\nexport interface ListFileNamesResponse {\n /** Array of file versions matching the request. */\n readonly files: readonly FileVersion[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/** Request parameters for the `b2_list_file_versions` API call. Lists all versions of files in a bucket. */\nexport interface ListFileVersionsRequest {\n /** Bucket to list file versions from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Return file versions starting after this ID. Used with startFileName for pagination. */\n readonly startFileId?: FileId\n /** Maximum number of file versions to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter?: string\n}\n\n/** Response from the `b2_list_file_versions` API call. */\nexport interface ListFileVersionsResponse {\n /** Array of file versions matching the request. */\n readonly files: readonly FileVersion[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Request parameters for the `b2_get_file_info` API call. */\nexport interface GetFileInfoRequest {\n /** ID of the file version to retrieve info for. */\n readonly fileId: FileId\n}\n\n/** Request parameters for the `b2_hide_file` API call. Hides a file so it no longer appears in `b2_list_file_names`. */\nexport interface HideFileRequest {\n /** Bucket containing the file to hide. */\n readonly bucketId: BucketId\n /** Name of the file to hide. */\n readonly fileName: string\n}\n\n/** Request parameters for the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionRequest {\n /** Name of the file version to delete. */\n readonly fileName: string\n /** ID of the file version to delete. */\n readonly fileId: FileId\n /** If true, bypass governance-mode retention. Requires the `bypassGovernance` capability. */\n readonly bypassGovernance?: boolean\n}\n\n/** Response from the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionResponse {\n /** ID of the deleted file version. */\n readonly fileId: FileId\n /** Name of the deleted file. */\n readonly fileName: string\n}\n\n/**\n * Named constants for how metadata is handled during a file copy.\n *\n * @example\n * ```ts\n * await bucket.copyFile({ ..., metadataDirective: MetadataDirective.Replace })\n * ```\n */\nexport const MetadataDirective = {\n /** Preserve the source file's contentType and fileInfo. */\n Copy: 'COPY',\n /** Use the values provided in the copy request. */\n Replace: 'REPLACE',\n} as const\n\n/** Controls how metadata is handled during a file copy. Derived from {@link MetadataDirective}. */\nexport type MetadataDirective = (typeof MetadataDirective)[keyof typeof MetadataDirective]\n\n/** Request parameters for the `b2_copy_file` API call. Performs a server-side file copy. */\nexport interface CopyFileRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** Destination bucket ID. Defaults to the source bucket if omitted. */\n readonly destinationBucketId?: BucketId\n /** Name for the destination file. */\n readonly fileName: string\n /** Byte range to copy (e.g., `'bytes=0-999'`). Omit to copy the entire file. */\n readonly range?: string\n /** Whether to copy or replace the source file's metadata. */\n readonly metadataDirective?: MetadataDirective\n /** MIME type for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly contentType?: string\n /** User-defined metadata for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly fileInfo?: Record<string, string>\n /** Object Lock retention for the destination file. */\n readonly fileRetention?: FileRetentionValue\n /** Legal hold for the destination file. */\n readonly legalHold?: LegalHoldValue\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination file. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Request parameters for the `b2_copy_part` API call. Copies a byte range into a large file part. */\nexport interface CopyPartRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** ID of the large file being assembled. */\n readonly largeFileId: FileId\n /** Part number (1-based) for this part within the large file. */\n readonly partNumber: number\n /** Byte range to copy from the source (e.g., `'bytes=0-999'`). Omit to copy the entire source. */\n readonly range?: string\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination part. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Response from the `b2_copy_part` API call. */\nexport interface CopyPartResponse {\n /** ID of the large file this part belongs to. */\n readonly fileId: FileId\n /** Part number within the large file. */\n readonly partNumber: number\n /** Size of the copied part in bytes. */\n readonly contentLength: number\n /** SHA-1 checksum of the copied part content. */\n readonly contentSha1: string\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,aAAa;;CAExB,OAAO;;CAEP,QAAQ;;CAER,MAAM;;CAEN,QAAQ;;CAER,MAAM;AACR;;;;;;;;;AAqJA,IAAa,oBAAoB;;CAE/B,MAAM;;CAEN,SAAS;AACX"}
|
|
1
|
+
{"version":3,"file":"file.cjs","names":[],"sources":["../../src/types/file.ts"],"sourcesContent":["import type { EncryptionSetting, PublicEncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId, FileId } from './ids.ts'\nimport type { FileRetentionValue, LegalHoldValue } from './lock.ts'\n\n/**\n * Named constants for the action that created a file version.\n *\n * @example\n * ```ts\n * if (file.action === FileAction.Hide) { ... }\n * ```\n */\nexport const FileAction = {\n /** Large file upload started but not yet finished. */\n Start: 'start',\n /** Normal upload (small or finished large file). */\n Upload: 'upload',\n /** Hide marker (soft delete). */\n Hide: 'hide',\n /** Virtual folder marker. */\n Folder: 'folder',\n /** Created via server-side copy. */\n Copy: 'copy',\n} as const\n\n/** MIME type B2 returns for hide-marker rows in `b2_list_file_versions`. */\nexport const HIDE_MARKER_CONTENT_TYPE = 'application/x-bz-hide-marker' as const\n\n/**\n * The action that created a file version. Derived from {@link FileAction}.\n *\n * - `'start'`: large file upload started but not yet finished.\n * - `'upload'`: file was uploaded normally.\n * - `'hide'`: file was hidden (soft-deleted).\n * - `'folder'`: virtual folder marker.\n * - `'copy'`: file was created via server-side copy.\n */\nexport type FileAction = (typeof FileAction)[keyof typeof FileAction]\n\n/** File actions that represent concrete file versions with a B2 file ID. */\nexport type ConcreteFileAction = Exclude<FileAction, typeof FileAction.Folder>\n\n/** File actions that represent listed concrete versions with file metadata. */\nexport type ListedFileAction = Exclude<ConcreteFileAction, typeof FileAction.Hide>\n\n/**\n * Replication status for a file version or unfinished large file.\n *\n * B2 returns these uppercase wire values as-is and omits the containing\n * `replicationStatus` field when the file is not covered by a replication rule.\n */\nexport type ReplicationStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REPLICA'\n\n/**\n * Complete metadata for a concrete file version in B2. Returned by\n * `b2_get_file_info`, `b2_upload_file`, `b2_copy_file`, `b2_hide_file`, and\n * other file-related endpoints. List endpoints return\n * {@link ListedFileVersion} for file-name listings and\n * {@link ListedConcreteFileVersion} for file-version listings unless a\n * delimiter is requested, in which case file-name listings return\n * {@link FileNameListEntry} and file-version listings return\n * {@link FileVersionListEntry}.\n */\nexport interface FileVersion {\n /** Account that owns this file. */\n readonly accountId: AccountId\n /** Action that created this file version. */\n readonly action: ConcreteFileAction\n /** Bucket containing this file. */\n readonly bucketId: BucketId\n /** Size of the file content in bytes. */\n readonly contentLength: number\n /** MD5 checksum of the content, or null if not available. */\n readonly contentMd5: string | null\n /** SHA-1 checksum of the content, or null if not available (e.g., large files). */\n readonly contentSha1: string | null\n /** MIME type of the file content. */\n readonly contentType: string\n /** Unique identifier for this file version. */\n readonly fileId: FileId\n /** User-defined key-value metadata stored with the file. */\n readonly fileInfo: Record<string, string>\n /** Full path and name of the file within the bucket. */\n readonly fileName: string\n /** Object Lock retention settings for this file version. */\n readonly fileRetention: {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null if the caller lacks read authorization. */\n readonly value: FileRetentionValue | null\n }\n /** Legal hold status for this file version. */\n readonly legalHold: {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null if the caller lacks read authorization. */\n readonly value: LegalHoldValue | null\n }\n /** Replication status when this file is covered by a replication rule. */\n readonly replicationStatus?: ReplicationStatus\n /** Server-side encryption settings applied to this file version. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this version was uploaded. */\n readonly uploadTimestamp: number\n}\n\n/** Concrete non-hide file version as returned from list endpoints. */\nexport interface ListedFileVersion extends Omit<FileVersion, 'action'> {\n /** Non-hide action with full file metadata. */\n readonly action: ListedFileAction\n}\n\n/** Hide marker as returned from list endpoints when B2 omits metadata fields. */\nexport interface ListedHideFileVersion\n extends Omit<\n FileVersion,\n 'action' | 'contentType' | 'fileRetention' | 'legalHold' | 'serverSideEncryption'\n > {\n /** Hide marker (soft delete). */\n readonly action: typeof FileAction.Hide\n /** B2 list APIs return the documented hide-marker MIME type. */\n readonly contentType: typeof HIDE_MARKER_CONTENT_TYPE\n}\n\n/** Virtual folder row returned by list endpoints when a delimiter groups file names. */\nexport interface FolderFileVersion {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Virtual folder marker. */\n readonly action: typeof FileAction.Folder\n /** Bucket containing the grouped files. */\n readonly bucketId: BucketId\n /** Always 0 for virtual folder rows. */\n readonly contentLength: 0\n /** Always null for virtual folder rows. */\n readonly contentMd5: null\n /** Always null for virtual folder rows. */\n readonly contentSha1: null\n /** Always null for virtual folder rows. */\n readonly contentType: null\n /** Always null for virtual folder rows. */\n readonly fileId: null\n /** Virtual folder rows do not carry file metadata. */\n readonly fileInfo: Record<string, string>\n /** Folder name, including the delimiter suffix. */\n readonly fileName: string\n /** Always 0 for virtual folder rows. */\n readonly uploadTimestamp: 0\n}\n\n/** Concrete file-version entry returned by list endpoints. */\nexport type ListedConcreteFileVersion = ListedFileVersion | ListedHideFileVersion\n\n/** Entry returned by `b2_list_file_names` when a delimiter groups file names. */\nexport type FileNameListEntry = ListedFileVersion | FolderFileVersion\n\n/** Entry returned by `b2_list_file_names` and `b2_list_file_versions`. */\nexport type FileVersionListEntry = ListedConcreteFileVersion | FolderFileVersion\n\n/**\n * Request parameters shared by `b2_list_file_names` calls.\n */\nexport interface ListFileNamesBaseRequest {\n /** Bucket to list files from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Maximum number of files to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n}\n\n/**\n * Request parameters for the non-delimiter `b2_list_file_names` API call.\n * Lists visible latest file versions in a bucket without hide markers or\n * virtual folder rows. Use {@link ListFileNamesWithDelimiterRequest} when\n * sending a `delimiter`.\n */\nexport interface ListFileNamesRequest extends ListFileNamesBaseRequest {\n /** Omit delimiter to receive only visible concrete file-version entries. */\n readonly delimiter?: undefined\n}\n\n/** Request parameters for delimiter-grouped `b2_list_file_names` calls. */\nexport interface ListFileNamesWithDelimiterRequest extends ListFileNamesBaseRequest {\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter: string\n}\n\n/** Request parameters for callers that dynamically include a delimiter. */\nexport interface ListFileNamesMaybeDelimiterRequest extends ListFileNamesBaseRequest {\n /** Optional delimiter for virtual folder grouping. */\n readonly delimiter?: string | undefined\n}\n\n/** Response from non-delimiter `b2_list_file_names` calls. */\nexport interface ListFileNamesResponse {\n /** Array of visible concrete file-version entries matching the request. */\n readonly files: readonly ListedFileVersion[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/** Response from delimiter-grouped `b2_list_file_names` calls. */\nexport interface ListFileNamesWithDelimiterResponse {\n /** Array of visible concrete file-version or virtual-folder entries. */\n readonly files: readonly FileNameListEntry[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/**\n * Request parameters shared by `b2_list_file_versions` calls.\n */\nexport interface ListFileVersionsBaseRequest {\n /** Bucket to list file versions from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Return file versions starting after this ID. Used with startFileName for pagination. */\n readonly startFileId?: FileId\n /** Maximum number of file versions to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n}\n\n/**\n * Request parameters for the non-delimiter `b2_list_file_versions` API call.\n * Lists all versions of files in a bucket without virtual folder rows. Use\n * {@link ListFileVersionsWithDelimiterRequest} when sending a `delimiter`.\n */\nexport interface ListFileVersionsRequest extends ListFileVersionsBaseRequest {\n /** Omit delimiter to receive only concrete file-version entries. */\n readonly delimiter?: undefined\n}\n\n/** Request parameters for delimiter-grouped `b2_list_file_versions` calls. */\nexport interface ListFileVersionsWithDelimiterRequest extends ListFileVersionsBaseRequest {\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter: string\n}\n\n/** Request parameters for callers that dynamically include a delimiter. */\nexport interface ListFileVersionsMaybeDelimiterRequest extends ListFileVersionsBaseRequest {\n /** Optional delimiter for virtual folder grouping. */\n readonly delimiter?: string | undefined\n}\n\n/** Response from non-delimiter `b2_list_file_versions` calls. */\nexport interface ListFileVersionsResponse {\n /** Array of concrete file-version entries matching the request. */\n readonly files: readonly ListedConcreteFileVersion[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Response from delimiter-grouped `b2_list_file_versions` calls. */\nexport interface ListFileVersionsWithDelimiterResponse {\n /** Array of concrete file-version or virtual-folder entries matching the request. */\n readonly files: readonly FileVersionListEntry[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Request parameters for the `b2_get_file_info` API call. */\nexport interface GetFileInfoRequest {\n /** ID of the file version to retrieve info for. */\n readonly fileId: FileId\n}\n\n/** Request parameters for the `b2_hide_file` API call. Hides a file so it no longer appears in `b2_list_file_names`. */\nexport interface HideFileRequest {\n /** Bucket containing the file to hide. */\n readonly bucketId: BucketId\n /** Name of the file to hide. */\n readonly fileName: string\n}\n\n/** Request parameters for the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionRequest {\n /** Name of the file version to delete. */\n readonly fileName: string\n /** ID of the file version to delete. */\n readonly fileId: FileId\n /** If true, bypass governance-mode retention. Requires the `bypassGovernance` capability. */\n readonly bypassGovernance?: boolean\n}\n\n/** Response from the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionResponse {\n /** ID of the deleted file version. */\n readonly fileId: FileId\n /** Name of the deleted file. */\n readonly fileName: string\n}\n\n/**\n * Named constants for how metadata is handled during a file copy.\n *\n * @example\n * ```ts\n * await bucket.copyFile({ ..., metadataDirective: MetadataDirective.Replace })\n * ```\n */\nexport const MetadataDirective = {\n /** Preserve the source file's contentType and fileInfo. */\n Copy: 'COPY',\n /** Use the values provided in the copy request. */\n Replace: 'REPLACE',\n} as const\n\n/** Controls how metadata is handled during a file copy. Derived from {@link MetadataDirective}. */\nexport type MetadataDirective = (typeof MetadataDirective)[keyof typeof MetadataDirective]\n\n/** Request parameters for the `b2_copy_file` API call. Performs a server-side file copy. */\nexport interface CopyFileRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** Destination bucket ID. Defaults to the source bucket if omitted. */\n readonly destinationBucketId?: BucketId\n /** Name for the destination file. */\n readonly fileName: string\n /** Byte range to copy (e.g., `'bytes=0-999'`). Omit to copy the entire file. */\n readonly range?: string\n /** Whether to copy or replace the source file's metadata. */\n readonly metadataDirective?: MetadataDirective\n /** MIME type for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly contentType?: string\n /** User-defined metadata for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly fileInfo?: Record<string, string>\n /** Object Lock retention for the destination file. */\n readonly fileRetention?: FileRetentionValue\n /** Legal hold for the destination file. */\n readonly legalHold?: LegalHoldValue\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination file. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Request parameters for the `b2_copy_part` API call. Copies a byte range into a large file part. */\nexport interface CopyPartRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** ID of the large file being assembled. */\n readonly largeFileId: FileId\n /** Part number (1-based) for this part within the large file. */\n readonly partNumber: number\n /** Byte range to copy from the source (e.g., `'bytes=0-999'`). Omit to copy the entire source. */\n readonly range?: string\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination part. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Response from the `b2_copy_part` API call. */\nexport interface CopyPartResponse {\n /** ID of the large file this part belongs to. */\n readonly fileId: FileId\n /** Part number within the large file. */\n readonly partNumber: number\n /** Size of the copied part in bytes. */\n readonly contentLength: number\n /** SHA-1 checksum of the copied part content. */\n readonly contentSha1: string\n /** MD5 checksum of the copied part content, or null if not available. */\n readonly contentMd5: string | null\n /** Server-side encryption applied to this copied part. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this part was copied. */\n readonly uploadTimestamp: number\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,aAAa;;CAExB,OAAO;;CAEP,QAAQ;;CAER,MAAM;;CAEN,QAAQ;;CAER,MAAM;AACR;;AAGA,IAAa,2BAA2B;;;;;;;;;AA4RxC,IAAa,oBAAoB;;CAE/B,MAAM;;CAEN,SAAS;AACX"}
|
package/dist/types/file.d.cts
CHANGED
|
@@ -21,6 +21,8 @@ export declare const FileAction: {
|
|
|
21
21
|
/** Created via server-side copy. */
|
|
22
22
|
readonly Copy: "copy";
|
|
23
23
|
};
|
|
24
|
+
/** MIME type B2 returns for hide-marker rows in `b2_list_file_versions`. */
|
|
25
|
+
export declare const HIDE_MARKER_CONTENT_TYPE: "application/x-bz-hide-marker";
|
|
24
26
|
/**
|
|
25
27
|
* The action that created a file version. Derived from {@link FileAction}.
|
|
26
28
|
*
|
|
@@ -31,16 +33,32 @@ export declare const FileAction: {
|
|
|
31
33
|
* - `'copy'`: file was created via server-side copy.
|
|
32
34
|
*/
|
|
33
35
|
export type FileAction = (typeof FileAction)[keyof typeof FileAction];
|
|
36
|
+
/** File actions that represent concrete file versions with a B2 file ID. */
|
|
37
|
+
export type ConcreteFileAction = Exclude<FileAction, typeof FileAction.Folder>;
|
|
38
|
+
/** File actions that represent listed concrete versions with file metadata. */
|
|
39
|
+
export type ListedFileAction = Exclude<ConcreteFileAction, typeof FileAction.Hide>;
|
|
34
40
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
41
|
+
* Replication status for a file version or unfinished large file.
|
|
42
|
+
*
|
|
43
|
+
* B2 returns these uppercase wire values as-is and omits the containing
|
|
44
|
+
* `replicationStatus` field when the file is not covered by a replication rule.
|
|
45
|
+
*/
|
|
46
|
+
export type ReplicationStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REPLICA';
|
|
47
|
+
/**
|
|
48
|
+
* Complete metadata for a concrete file version in B2. Returned by
|
|
49
|
+
* `b2_get_file_info`, `b2_upload_file`, `b2_copy_file`, `b2_hide_file`, and
|
|
50
|
+
* other file-related endpoints. List endpoints return
|
|
51
|
+
* {@link ListedFileVersion} for file-name listings and
|
|
52
|
+
* {@link ListedConcreteFileVersion} for file-version listings unless a
|
|
53
|
+
* delimiter is requested, in which case file-name listings return
|
|
54
|
+
* {@link FileNameListEntry} and file-version listings return
|
|
55
|
+
* {@link FileVersionListEntry}.
|
|
38
56
|
*/
|
|
39
57
|
export interface FileVersion {
|
|
40
58
|
/** Account that owns this file. */
|
|
41
59
|
readonly accountId: AccountId;
|
|
42
60
|
/** Action that created this file version. */
|
|
43
|
-
readonly action:
|
|
61
|
+
readonly action: ConcreteFileAction;
|
|
44
62
|
/** Bucket containing this file. */
|
|
45
63
|
readonly bucketId: BucketId;
|
|
46
64
|
/** Size of the file content in bytes. */
|
|
@@ -71,15 +89,60 @@ export interface FileVersion {
|
|
|
71
89
|
/** Legal hold value, or null if the caller lacks read authorization. */
|
|
72
90
|
readonly value: LegalHoldValue | null;
|
|
73
91
|
};
|
|
74
|
-
/** Replication status
|
|
75
|
-
readonly replicationStatus
|
|
92
|
+
/** Replication status when this file is covered by a replication rule. */
|
|
93
|
+
readonly replicationStatus?: ReplicationStatus;
|
|
76
94
|
/** Server-side encryption settings applied to this file version. */
|
|
77
95
|
readonly serverSideEncryption: PublicEncryptionSetting;
|
|
78
96
|
/** UTC timestamp (milliseconds) when this version was uploaded. */
|
|
79
97
|
readonly uploadTimestamp: number;
|
|
80
98
|
}
|
|
81
|
-
/**
|
|
82
|
-
export interface
|
|
99
|
+
/** Concrete non-hide file version as returned from list endpoints. */
|
|
100
|
+
export interface ListedFileVersion extends Omit<FileVersion, 'action'> {
|
|
101
|
+
/** Non-hide action with full file metadata. */
|
|
102
|
+
readonly action: ListedFileAction;
|
|
103
|
+
}
|
|
104
|
+
/** Hide marker as returned from list endpoints when B2 omits metadata fields. */
|
|
105
|
+
export interface ListedHideFileVersion extends Omit<FileVersion, 'action' | 'contentType' | 'fileRetention' | 'legalHold' | 'serverSideEncryption'> {
|
|
106
|
+
/** Hide marker (soft delete). */
|
|
107
|
+
readonly action: typeof FileAction.Hide;
|
|
108
|
+
/** B2 list APIs return the documented hide-marker MIME type. */
|
|
109
|
+
readonly contentType: typeof HIDE_MARKER_CONTENT_TYPE;
|
|
110
|
+
}
|
|
111
|
+
/** Virtual folder row returned by list endpoints when a delimiter groups file names. */
|
|
112
|
+
export interface FolderFileVersion {
|
|
113
|
+
/** Account that owns this bucket. */
|
|
114
|
+
readonly accountId: AccountId;
|
|
115
|
+
/** Virtual folder marker. */
|
|
116
|
+
readonly action: typeof FileAction.Folder;
|
|
117
|
+
/** Bucket containing the grouped files. */
|
|
118
|
+
readonly bucketId: BucketId;
|
|
119
|
+
/** Always 0 for virtual folder rows. */
|
|
120
|
+
readonly contentLength: 0;
|
|
121
|
+
/** Always null for virtual folder rows. */
|
|
122
|
+
readonly contentMd5: null;
|
|
123
|
+
/** Always null for virtual folder rows. */
|
|
124
|
+
readonly contentSha1: null;
|
|
125
|
+
/** Always null for virtual folder rows. */
|
|
126
|
+
readonly contentType: null;
|
|
127
|
+
/** Always null for virtual folder rows. */
|
|
128
|
+
readonly fileId: null;
|
|
129
|
+
/** Virtual folder rows do not carry file metadata. */
|
|
130
|
+
readonly fileInfo: Record<string, string>;
|
|
131
|
+
/** Folder name, including the delimiter suffix. */
|
|
132
|
+
readonly fileName: string;
|
|
133
|
+
/** Always 0 for virtual folder rows. */
|
|
134
|
+
readonly uploadTimestamp: 0;
|
|
135
|
+
}
|
|
136
|
+
/** Concrete file-version entry returned by list endpoints. */
|
|
137
|
+
export type ListedConcreteFileVersion = ListedFileVersion | ListedHideFileVersion;
|
|
138
|
+
/** Entry returned by `b2_list_file_names` when a delimiter groups file names. */
|
|
139
|
+
export type FileNameListEntry = ListedFileVersion | FolderFileVersion;
|
|
140
|
+
/** Entry returned by `b2_list_file_names` and `b2_list_file_versions`. */
|
|
141
|
+
export type FileVersionListEntry = ListedConcreteFileVersion | FolderFileVersion;
|
|
142
|
+
/**
|
|
143
|
+
* Request parameters shared by `b2_list_file_names` calls.
|
|
144
|
+
*/
|
|
145
|
+
export interface ListFileNamesBaseRequest {
|
|
83
146
|
/** Bucket to list files from. */
|
|
84
147
|
readonly bucketId: BucketId;
|
|
85
148
|
/** Return files starting after this name (exclusive). Used for pagination. */
|
|
@@ -88,18 +151,45 @@ export interface ListFileNamesRequest {
|
|
|
88
151
|
readonly maxFileCount?: number;
|
|
89
152
|
/** Only return files whose names start with this prefix. */
|
|
90
153
|
readonly prefix?: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Request parameters for the non-delimiter `b2_list_file_names` API call.
|
|
157
|
+
* Lists visible latest file versions in a bucket without hide markers or
|
|
158
|
+
* virtual folder rows. Use {@link ListFileNamesWithDelimiterRequest} when
|
|
159
|
+
* sending a `delimiter`.
|
|
160
|
+
*/
|
|
161
|
+
export interface ListFileNamesRequest extends ListFileNamesBaseRequest {
|
|
162
|
+
/** Omit delimiter to receive only visible concrete file-version entries. */
|
|
163
|
+
readonly delimiter?: undefined;
|
|
164
|
+
}
|
|
165
|
+
/** Request parameters for delimiter-grouped `b2_list_file_names` calls. */
|
|
166
|
+
export interface ListFileNamesWithDelimiterRequest extends ListFileNamesBaseRequest {
|
|
91
167
|
/** Delimiter for virtual folder grouping (typically `'/'`). */
|
|
92
|
-
readonly delimiter
|
|
168
|
+
readonly delimiter: string;
|
|
169
|
+
}
|
|
170
|
+
/** Request parameters for callers that dynamically include a delimiter. */
|
|
171
|
+
export interface ListFileNamesMaybeDelimiterRequest extends ListFileNamesBaseRequest {
|
|
172
|
+
/** Optional delimiter for virtual folder grouping. */
|
|
173
|
+
readonly delimiter?: string | undefined;
|
|
93
174
|
}
|
|
94
|
-
/** Response from
|
|
175
|
+
/** Response from non-delimiter `b2_list_file_names` calls. */
|
|
95
176
|
export interface ListFileNamesResponse {
|
|
96
|
-
/** Array of file
|
|
97
|
-
readonly files: readonly
|
|
177
|
+
/** Array of visible concrete file-version entries matching the request. */
|
|
178
|
+
readonly files: readonly ListedFileVersion[];
|
|
98
179
|
/** Next file name to use for pagination, or null if all files have been listed. */
|
|
99
180
|
readonly nextFileName: string | null;
|
|
100
181
|
}
|
|
101
|
-
/**
|
|
102
|
-
export interface
|
|
182
|
+
/** Response from delimiter-grouped `b2_list_file_names` calls. */
|
|
183
|
+
export interface ListFileNamesWithDelimiterResponse {
|
|
184
|
+
/** Array of visible concrete file-version or virtual-folder entries. */
|
|
185
|
+
readonly files: readonly FileNameListEntry[];
|
|
186
|
+
/** Next file name to use for pagination, or null if all files have been listed. */
|
|
187
|
+
readonly nextFileName: string | null;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Request parameters shared by `b2_list_file_versions` calls.
|
|
191
|
+
*/
|
|
192
|
+
export interface ListFileVersionsBaseRequest {
|
|
103
193
|
/** Bucket to list file versions from. */
|
|
104
194
|
readonly bucketId: BucketId;
|
|
105
195
|
/** Return files starting after this name (exclusive). Used for pagination. */
|
|
@@ -110,13 +200,39 @@ export interface ListFileVersionsRequest {
|
|
|
110
200
|
readonly maxFileCount?: number;
|
|
111
201
|
/** Only return files whose names start with this prefix. */
|
|
112
202
|
readonly prefix?: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Request parameters for the non-delimiter `b2_list_file_versions` API call.
|
|
206
|
+
* Lists all versions of files in a bucket without virtual folder rows. Use
|
|
207
|
+
* {@link ListFileVersionsWithDelimiterRequest} when sending a `delimiter`.
|
|
208
|
+
*/
|
|
209
|
+
export interface ListFileVersionsRequest extends ListFileVersionsBaseRequest {
|
|
210
|
+
/** Omit delimiter to receive only concrete file-version entries. */
|
|
211
|
+
readonly delimiter?: undefined;
|
|
212
|
+
}
|
|
213
|
+
/** Request parameters for delimiter-grouped `b2_list_file_versions` calls. */
|
|
214
|
+
export interface ListFileVersionsWithDelimiterRequest extends ListFileVersionsBaseRequest {
|
|
113
215
|
/** Delimiter for virtual folder grouping (typically `'/'`). */
|
|
114
|
-
readonly delimiter
|
|
216
|
+
readonly delimiter: string;
|
|
115
217
|
}
|
|
116
|
-
/**
|
|
218
|
+
/** Request parameters for callers that dynamically include a delimiter. */
|
|
219
|
+
export interface ListFileVersionsMaybeDelimiterRequest extends ListFileVersionsBaseRequest {
|
|
220
|
+
/** Optional delimiter for virtual folder grouping. */
|
|
221
|
+
readonly delimiter?: string | undefined;
|
|
222
|
+
}
|
|
223
|
+
/** Response from non-delimiter `b2_list_file_versions` calls. */
|
|
117
224
|
export interface ListFileVersionsResponse {
|
|
118
|
-
/** Array of file
|
|
119
|
-
readonly files: readonly
|
|
225
|
+
/** Array of concrete file-version entries matching the request. */
|
|
226
|
+
readonly files: readonly ListedConcreteFileVersion[];
|
|
227
|
+
/** Next file name to use for pagination, or null if all versions have been listed. */
|
|
228
|
+
readonly nextFileName: string | null;
|
|
229
|
+
/** Next file ID to use for pagination, or null if all versions have been listed. */
|
|
230
|
+
readonly nextFileId: FileId | null;
|
|
231
|
+
}
|
|
232
|
+
/** Response from delimiter-grouped `b2_list_file_versions` calls. */
|
|
233
|
+
export interface ListFileVersionsWithDelimiterResponse {
|
|
234
|
+
/** Array of concrete file-version or virtual-folder entries matching the request. */
|
|
235
|
+
readonly files: readonly FileVersionListEntry[];
|
|
120
236
|
/** Next file name to use for pagination, or null if all versions have been listed. */
|
|
121
237
|
readonly nextFileName: string | null;
|
|
122
238
|
/** Next file ID to use for pagination, or null if all versions have been listed. */
|
|
@@ -216,5 +332,11 @@ export interface CopyPartResponse {
|
|
|
216
332
|
readonly contentLength: number;
|
|
217
333
|
/** SHA-1 checksum of the copied part content. */
|
|
218
334
|
readonly contentSha1: string;
|
|
335
|
+
/** MD5 checksum of the copied part content, or null if not available. */
|
|
336
|
+
readonly contentMd5: string | null;
|
|
337
|
+
/** Server-side encryption applied to this copied part. */
|
|
338
|
+
readonly serverSideEncryption: PublicEncryptionSetting;
|
|
339
|
+
/** UTC timestamp (milliseconds) when this part was copied. */
|
|
340
|
+
readonly uploadTimestamp: number;
|
|
219
341
|
}
|
|
220
342
|
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;IACrB,sDAAsD;;IAEtD,oDAAoD;;IAEpD,iCAAiC;;IAEjC,6BAA6B;;IAE7B,oCAAoC;;CAE5B,CAAA;AAEV;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAErE
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;IACrB,sDAAsD;;IAEtD,oDAAoD;;IAEp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,MAAM,CAAA;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,kGAAkG;IAClG,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,yFAAyF;IACzF,QAAQ,CAAC,0BAA0B,CAAC,EAAE,iBAAiB,CAAA;IACvD,+DAA+D;IAC/D,QAAQ,CAAC,+BAA+B,CAAC,EAAE,iBAAiB,CAAA;CAC7D;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,yCAAyC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,oBAAoB,EAAE,uBAAuB,CAAA;IACtD,8DAA8D;IAC9D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACjC"}
|
package/dist/types/file.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare const FileAction: {
|
|
|
21
21
|
/** Created via server-side copy. */
|
|
22
22
|
readonly Copy: "copy";
|
|
23
23
|
};
|
|
24
|
+
/** MIME type B2 returns for hide-marker rows in `b2_list_file_versions`. */
|
|
25
|
+
export declare const HIDE_MARKER_CONTENT_TYPE: "application/x-bz-hide-marker";
|
|
24
26
|
/**
|
|
25
27
|
* The action that created a file version. Derived from {@link FileAction}.
|
|
26
28
|
*
|
|
@@ -31,16 +33,32 @@ export declare const FileAction: {
|
|
|
31
33
|
* - `'copy'`: file was created via server-side copy.
|
|
32
34
|
*/
|
|
33
35
|
export type FileAction = (typeof FileAction)[keyof typeof FileAction];
|
|
36
|
+
/** File actions that represent concrete file versions with a B2 file ID. */
|
|
37
|
+
export type ConcreteFileAction = Exclude<FileAction, typeof FileAction.Folder>;
|
|
38
|
+
/** File actions that represent listed concrete versions with file metadata. */
|
|
39
|
+
export type ListedFileAction = Exclude<ConcreteFileAction, typeof FileAction.Hide>;
|
|
34
40
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
41
|
+
* Replication status for a file version or unfinished large file.
|
|
42
|
+
*
|
|
43
|
+
* B2 returns these uppercase wire values as-is and omits the containing
|
|
44
|
+
* `replicationStatus` field when the file is not covered by a replication rule.
|
|
45
|
+
*/
|
|
46
|
+
export type ReplicationStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REPLICA';
|
|
47
|
+
/**
|
|
48
|
+
* Complete metadata for a concrete file version in B2. Returned by
|
|
49
|
+
* `b2_get_file_info`, `b2_upload_file`, `b2_copy_file`, `b2_hide_file`, and
|
|
50
|
+
* other file-related endpoints. List endpoints return
|
|
51
|
+
* {@link ListedFileVersion} for file-name listings and
|
|
52
|
+
* {@link ListedConcreteFileVersion} for file-version listings unless a
|
|
53
|
+
* delimiter is requested, in which case file-name listings return
|
|
54
|
+
* {@link FileNameListEntry} and file-version listings return
|
|
55
|
+
* {@link FileVersionListEntry}.
|
|
38
56
|
*/
|
|
39
57
|
export interface FileVersion {
|
|
40
58
|
/** Account that owns this file. */
|
|
41
59
|
readonly accountId: AccountId;
|
|
42
60
|
/** Action that created this file version. */
|
|
43
|
-
readonly action:
|
|
61
|
+
readonly action: ConcreteFileAction;
|
|
44
62
|
/** Bucket containing this file. */
|
|
45
63
|
readonly bucketId: BucketId;
|
|
46
64
|
/** Size of the file content in bytes. */
|
|
@@ -71,15 +89,60 @@ export interface FileVersion {
|
|
|
71
89
|
/** Legal hold value, or null if the caller lacks read authorization. */
|
|
72
90
|
readonly value: LegalHoldValue | null;
|
|
73
91
|
};
|
|
74
|
-
/** Replication status
|
|
75
|
-
readonly replicationStatus
|
|
92
|
+
/** Replication status when this file is covered by a replication rule. */
|
|
93
|
+
readonly replicationStatus?: ReplicationStatus;
|
|
76
94
|
/** Server-side encryption settings applied to this file version. */
|
|
77
95
|
readonly serverSideEncryption: PublicEncryptionSetting;
|
|
78
96
|
/** UTC timestamp (milliseconds) when this version was uploaded. */
|
|
79
97
|
readonly uploadTimestamp: number;
|
|
80
98
|
}
|
|
81
|
-
/**
|
|
82
|
-
export interface
|
|
99
|
+
/** Concrete non-hide file version as returned from list endpoints. */
|
|
100
|
+
export interface ListedFileVersion extends Omit<FileVersion, 'action'> {
|
|
101
|
+
/** Non-hide action with full file metadata. */
|
|
102
|
+
readonly action: ListedFileAction;
|
|
103
|
+
}
|
|
104
|
+
/** Hide marker as returned from list endpoints when B2 omits metadata fields. */
|
|
105
|
+
export interface ListedHideFileVersion extends Omit<FileVersion, 'action' | 'contentType' | 'fileRetention' | 'legalHold' | 'serverSideEncryption'> {
|
|
106
|
+
/** Hide marker (soft delete). */
|
|
107
|
+
readonly action: typeof FileAction.Hide;
|
|
108
|
+
/** B2 list APIs return the documented hide-marker MIME type. */
|
|
109
|
+
readonly contentType: typeof HIDE_MARKER_CONTENT_TYPE;
|
|
110
|
+
}
|
|
111
|
+
/** Virtual folder row returned by list endpoints when a delimiter groups file names. */
|
|
112
|
+
export interface FolderFileVersion {
|
|
113
|
+
/** Account that owns this bucket. */
|
|
114
|
+
readonly accountId: AccountId;
|
|
115
|
+
/** Virtual folder marker. */
|
|
116
|
+
readonly action: typeof FileAction.Folder;
|
|
117
|
+
/** Bucket containing the grouped files. */
|
|
118
|
+
readonly bucketId: BucketId;
|
|
119
|
+
/** Always 0 for virtual folder rows. */
|
|
120
|
+
readonly contentLength: 0;
|
|
121
|
+
/** Always null for virtual folder rows. */
|
|
122
|
+
readonly contentMd5: null;
|
|
123
|
+
/** Always null for virtual folder rows. */
|
|
124
|
+
readonly contentSha1: null;
|
|
125
|
+
/** Always null for virtual folder rows. */
|
|
126
|
+
readonly contentType: null;
|
|
127
|
+
/** Always null for virtual folder rows. */
|
|
128
|
+
readonly fileId: null;
|
|
129
|
+
/** Virtual folder rows do not carry file metadata. */
|
|
130
|
+
readonly fileInfo: Record<string, string>;
|
|
131
|
+
/** Folder name, including the delimiter suffix. */
|
|
132
|
+
readonly fileName: string;
|
|
133
|
+
/** Always 0 for virtual folder rows. */
|
|
134
|
+
readonly uploadTimestamp: 0;
|
|
135
|
+
}
|
|
136
|
+
/** Concrete file-version entry returned by list endpoints. */
|
|
137
|
+
export type ListedConcreteFileVersion = ListedFileVersion | ListedHideFileVersion;
|
|
138
|
+
/** Entry returned by `b2_list_file_names` when a delimiter groups file names. */
|
|
139
|
+
export type FileNameListEntry = ListedFileVersion | FolderFileVersion;
|
|
140
|
+
/** Entry returned by `b2_list_file_names` and `b2_list_file_versions`. */
|
|
141
|
+
export type FileVersionListEntry = ListedConcreteFileVersion | FolderFileVersion;
|
|
142
|
+
/**
|
|
143
|
+
* Request parameters shared by `b2_list_file_names` calls.
|
|
144
|
+
*/
|
|
145
|
+
export interface ListFileNamesBaseRequest {
|
|
83
146
|
/** Bucket to list files from. */
|
|
84
147
|
readonly bucketId: BucketId;
|
|
85
148
|
/** Return files starting after this name (exclusive). Used for pagination. */
|
|
@@ -88,18 +151,45 @@ export interface ListFileNamesRequest {
|
|
|
88
151
|
readonly maxFileCount?: number;
|
|
89
152
|
/** Only return files whose names start with this prefix. */
|
|
90
153
|
readonly prefix?: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Request parameters for the non-delimiter `b2_list_file_names` API call.
|
|
157
|
+
* Lists visible latest file versions in a bucket without hide markers or
|
|
158
|
+
* virtual folder rows. Use {@link ListFileNamesWithDelimiterRequest} when
|
|
159
|
+
* sending a `delimiter`.
|
|
160
|
+
*/
|
|
161
|
+
export interface ListFileNamesRequest extends ListFileNamesBaseRequest {
|
|
162
|
+
/** Omit delimiter to receive only visible concrete file-version entries. */
|
|
163
|
+
readonly delimiter?: undefined;
|
|
164
|
+
}
|
|
165
|
+
/** Request parameters for delimiter-grouped `b2_list_file_names` calls. */
|
|
166
|
+
export interface ListFileNamesWithDelimiterRequest extends ListFileNamesBaseRequest {
|
|
91
167
|
/** Delimiter for virtual folder grouping (typically `'/'`). */
|
|
92
|
-
readonly delimiter
|
|
168
|
+
readonly delimiter: string;
|
|
169
|
+
}
|
|
170
|
+
/** Request parameters for callers that dynamically include a delimiter. */
|
|
171
|
+
export interface ListFileNamesMaybeDelimiterRequest extends ListFileNamesBaseRequest {
|
|
172
|
+
/** Optional delimiter for virtual folder grouping. */
|
|
173
|
+
readonly delimiter?: string | undefined;
|
|
93
174
|
}
|
|
94
|
-
/** Response from
|
|
175
|
+
/** Response from non-delimiter `b2_list_file_names` calls. */
|
|
95
176
|
export interface ListFileNamesResponse {
|
|
96
|
-
/** Array of file
|
|
97
|
-
readonly files: readonly
|
|
177
|
+
/** Array of visible concrete file-version entries matching the request. */
|
|
178
|
+
readonly files: readonly ListedFileVersion[];
|
|
98
179
|
/** Next file name to use for pagination, or null if all files have been listed. */
|
|
99
180
|
readonly nextFileName: string | null;
|
|
100
181
|
}
|
|
101
|
-
/**
|
|
102
|
-
export interface
|
|
182
|
+
/** Response from delimiter-grouped `b2_list_file_names` calls. */
|
|
183
|
+
export interface ListFileNamesWithDelimiterResponse {
|
|
184
|
+
/** Array of visible concrete file-version or virtual-folder entries. */
|
|
185
|
+
readonly files: readonly FileNameListEntry[];
|
|
186
|
+
/** Next file name to use for pagination, or null if all files have been listed. */
|
|
187
|
+
readonly nextFileName: string | null;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Request parameters shared by `b2_list_file_versions` calls.
|
|
191
|
+
*/
|
|
192
|
+
export interface ListFileVersionsBaseRequest {
|
|
103
193
|
/** Bucket to list file versions from. */
|
|
104
194
|
readonly bucketId: BucketId;
|
|
105
195
|
/** Return files starting after this name (exclusive). Used for pagination. */
|
|
@@ -110,13 +200,39 @@ export interface ListFileVersionsRequest {
|
|
|
110
200
|
readonly maxFileCount?: number;
|
|
111
201
|
/** Only return files whose names start with this prefix. */
|
|
112
202
|
readonly prefix?: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Request parameters for the non-delimiter `b2_list_file_versions` API call.
|
|
206
|
+
* Lists all versions of files in a bucket without virtual folder rows. Use
|
|
207
|
+
* {@link ListFileVersionsWithDelimiterRequest} when sending a `delimiter`.
|
|
208
|
+
*/
|
|
209
|
+
export interface ListFileVersionsRequest extends ListFileVersionsBaseRequest {
|
|
210
|
+
/** Omit delimiter to receive only concrete file-version entries. */
|
|
211
|
+
readonly delimiter?: undefined;
|
|
212
|
+
}
|
|
213
|
+
/** Request parameters for delimiter-grouped `b2_list_file_versions` calls. */
|
|
214
|
+
export interface ListFileVersionsWithDelimiterRequest extends ListFileVersionsBaseRequest {
|
|
113
215
|
/** Delimiter for virtual folder grouping (typically `'/'`). */
|
|
114
|
-
readonly delimiter
|
|
216
|
+
readonly delimiter: string;
|
|
115
217
|
}
|
|
116
|
-
/**
|
|
218
|
+
/** Request parameters for callers that dynamically include a delimiter. */
|
|
219
|
+
export interface ListFileVersionsMaybeDelimiterRequest extends ListFileVersionsBaseRequest {
|
|
220
|
+
/** Optional delimiter for virtual folder grouping. */
|
|
221
|
+
readonly delimiter?: string | undefined;
|
|
222
|
+
}
|
|
223
|
+
/** Response from non-delimiter `b2_list_file_versions` calls. */
|
|
117
224
|
export interface ListFileVersionsResponse {
|
|
118
|
-
/** Array of file
|
|
119
|
-
readonly files: readonly
|
|
225
|
+
/** Array of concrete file-version entries matching the request. */
|
|
226
|
+
readonly files: readonly ListedConcreteFileVersion[];
|
|
227
|
+
/** Next file name to use for pagination, or null if all versions have been listed. */
|
|
228
|
+
readonly nextFileName: string | null;
|
|
229
|
+
/** Next file ID to use for pagination, or null if all versions have been listed. */
|
|
230
|
+
readonly nextFileId: FileId | null;
|
|
231
|
+
}
|
|
232
|
+
/** Response from delimiter-grouped `b2_list_file_versions` calls. */
|
|
233
|
+
export interface ListFileVersionsWithDelimiterResponse {
|
|
234
|
+
/** Array of concrete file-version or virtual-folder entries matching the request. */
|
|
235
|
+
readonly files: readonly FileVersionListEntry[];
|
|
120
236
|
/** Next file name to use for pagination, or null if all versions have been listed. */
|
|
121
237
|
readonly nextFileName: string | null;
|
|
122
238
|
/** Next file ID to use for pagination, or null if all versions have been listed. */
|
|
@@ -216,5 +332,11 @@ export interface CopyPartResponse {
|
|
|
216
332
|
readonly contentLength: number;
|
|
217
333
|
/** SHA-1 checksum of the copied part content. */
|
|
218
334
|
readonly contentSha1: string;
|
|
335
|
+
/** MD5 checksum of the copied part content, or null if not available. */
|
|
336
|
+
readonly contentMd5: string | null;
|
|
337
|
+
/** Server-side encryption applied to this copied part. */
|
|
338
|
+
readonly serverSideEncryption: PublicEncryptionSetting;
|
|
339
|
+
/** UTC timestamp (milliseconds) when this part was copied. */
|
|
340
|
+
readonly uploadTimestamp: number;
|
|
219
341
|
}
|
|
220
342
|
//# sourceMappingURL=file.d.ts.map
|
package/dist/types/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;IACrB,sDAAsD;;IAEtD,oDAAoD;;IAEpD,iCAAiC;;IAEjC,6BAA6B;;IAE7B,oCAAoC;;CAE5B,CAAA;AAEV;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAErE
|
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copy: "copy"
|
|
21
21
|
};
|
|
22
|
+
/** MIME type B2 returns for hide-marker rows in `b2_list_file_versions`. */
|
|
23
|
+
var HIDE_MARKER_CONTENT_TYPE = "application/x-bz-hide-marker";
|
|
22
24
|
/**
|
|
23
25
|
* Named constants for how metadata is handled during a file copy.
|
|
24
26
|
*
|
|
@@ -34,6 +36,6 @@ var MetadataDirective = {
|
|
|
34
36
|
Replace: "REPLACE"
|
|
35
37
|
};
|
|
36
38
|
//#endregion
|
|
37
|
-
export { FileAction, MetadataDirective };
|
|
39
|
+
export { FileAction, HIDE_MARKER_CONTENT_TYPE, MetadataDirective };
|
|
38
40
|
|
|
39
41
|
//# sourceMappingURL=file.js.map
|