@backblaze-labs/b2-sdk 0.1.0 → 0.3.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 +151 -5
- package/README.md +163 -34
- package/dist/_virtual/_b2-sdk-version-json.cjs +4 -0
- package/dist/_virtual/_b2-sdk-version-json.js +4 -0
- package/dist/auth/account-info.d.cts +32 -0
- package/dist/auth/account-info.d.cts.map +1 -1
- package/dist/auth/account-info.d.ts +32 -0
- package/dist/auth/account-info.d.ts.map +1 -1
- package/dist/auth/file.cjs +408 -207
- package/dist/auth/file.cjs.map +1 -1
- package/dist/auth/file.d.cts +77 -3
- package/dist/auth/file.d.cts.map +1 -1
- package/dist/auth/file.d.ts +77 -3
- package/dist/auth/file.d.ts.map +1 -1
- package/dist/auth/file.js +407 -207
- package/dist/auth/file.js.map +1 -1
- package/dist/auth/in-memory.cjs +212 -183
- package/dist/auth/in-memory.cjs.map +1 -1
- package/dist/auth/in-memory.d.cts +8 -0
- package/dist/auth/in-memory.d.cts.map +1 -1
- package/dist/auth/in-memory.d.ts +8 -0
- package/dist/auth/in-memory.d.ts.map +1 -1
- package/dist/auth/in-memory.js +211 -182
- package/dist/auth/in-memory.js.map +1 -1
- package/dist/auth/index.cjs +7 -9
- package/dist/auth/index.d.cts +3 -2
- package/dist/auth/index.d.cts.map +1 -1
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -8
- package/dist/auth/realms.cjs +80 -7
- package/dist/auth/realms.cjs.map +1 -1
- package/dist/auth/realms.d.cts +27 -4
- package/dist/auth/realms.d.cts.map +1 -1
- package/dist/auth/realms.d.ts +27 -4
- package/dist/auth/realms.d.ts.map +1 -1
- package/dist/auth/realms.js +80 -9
- package/dist/auth/realms.js.map +1 -1
- package/dist/auth/upload-url-pool.cjs +55 -51
- package/dist/auth/upload-url-pool.cjs.map +1 -1
- package/dist/auth/upload-url-pool.js +55 -51
- package/dist/auth/upload-url-pool.js.map +1 -1
- 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 +146 -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 +146 -0
- package/dist/backup/raw.js.map +1 -0
- package/dist/bucket.cjs +786 -787
- package/dist/bucket.cjs.map +1 -1
- package/dist/bucket.d.cts +35 -47
- package/dist/bucket.d.cts.map +1 -1
- package/dist/bucket.d.ts +35 -47
- package/dist/bucket.d.ts.map +1 -1
- package/dist/bucket.js +781 -782
- package/dist/bucket.js.map +1 -1
- package/dist/client.cjs +246 -228
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +25 -17
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.ts +25 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +243 -225
- package/dist/client.js.map +1 -1
- package/dist/copy/large.cjs +116 -71
- package/dist/copy/large.cjs.map +1 -1
- package/dist/copy/large.d.cts +6 -0
- package/dist/copy/large.d.cts.map +1 -1
- package/dist/copy/large.d.ts +6 -0
- package/dist/copy/large.d.ts.map +1 -1
- package/dist/copy/large.js +114 -69
- package/dist/copy/large.js.map +1 -1
- package/dist/download/checksum.cjs +93 -0
- package/dist/download/checksum.cjs.map +1 -0
- package/dist/download/checksum.d.cts +40 -0
- package/dist/download/checksum.d.cts.map +1 -0
- package/dist/download/checksum.d.ts +40 -0
- package/dist/download/checksum.d.ts.map +1 -0
- package/dist/download/checksum.js +91 -0
- package/dist/download/checksum.js.map +1 -0
- package/dist/download/parallel.cjs +251 -118
- package/dist/download/parallel.cjs.map +1 -1
- package/dist/download/parallel.d.cts +13 -2
- package/dist/download/parallel.d.cts.map +1 -1
- package/dist/download/parallel.d.ts +13 -2
- package/dist/download/parallel.d.ts.map +1 -1
- package/dist/download/parallel.js +249 -116
- package/dist/download/parallel.js.map +1 -1
- package/dist/download/single.cjs +323 -97
- package/dist/download/single.cjs.map +1 -1
- package/dist/download/single.d.cts +6 -1
- package/dist/download/single.d.cts.map +1 -1
- package/dist/download/single.d.ts +6 -1
- package/dist/download/single.d.ts.map +1 -1
- package/dist/download/single.js +322 -99
- package/dist/download/single.js.map +1 -1
- package/dist/errors/index.cjs +869 -243
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +404 -82
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +404 -82
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +835 -261
- package/dist/errors/index.js.map +1 -1
- package/dist/http/retry.cjs +45 -28
- package/dist/http/retry.cjs.map +1 -1
- package/dist/http/retry.d.cts +15 -2
- package/dist/http/retry.d.cts.map +1 -1
- package/dist/http/retry.d.ts +15 -2
- package/dist/http/retry.d.ts.map +1 -1
- package/dist/http/retry.js +46 -31
- package/dist/http/retry.js.map +1 -1
- package/dist/http/transport.cjs +476 -140
- package/dist/http/transport.cjs.map +1 -1
- package/dist/http/transport.d.cts +46 -5
- package/dist/http/transport.d.cts.map +1 -1
- package/dist/http/transport.d.ts +46 -5
- package/dist/http/transport.d.ts.map +1 -1
- package/dist/http/transport.js +474 -140
- package/dist/http/transport.js.map +1 -1
- package/dist/http/url-guard.cjs +154 -89
- package/dist/http/url-guard.cjs.map +1 -1
- package/dist/http/url-guard.d.cts +25 -3
- package/dist/http/url-guard.d.cts.map +1 -1
- package/dist/http/url-guard.d.ts +25 -3
- package/dist/http/url-guard.d.ts.map +1 -1
- package/dist/http/url-guard.js +152 -90
- package/dist/http/url-guard.js.map +1 -1
- package/dist/http/user-agent.cjs +84 -44
- package/dist/http/user-agent.cjs.map +1 -1
- package/dist/http/user-agent.js +84 -46
- package/dist/http/user-agent.js.map +1 -1
- package/dist/index.cjs +124 -77
- package/dist/index.d.cts +29 -21
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +29 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -72
- package/dist/internal/b2-naming.cjs +66 -0
- package/dist/internal/b2-naming.cjs.map +1 -0
- package/dist/internal/b2-naming.d.cts +43 -0
- package/dist/internal/b2-naming.d.cts.map +1 -0
- package/dist/internal/b2-naming.d.ts +43 -0
- package/dist/internal/b2-naming.d.ts.map +1 -0
- package/dist/internal/b2-naming.js +60 -0
- package/dist/internal/b2-naming.js.map +1 -0
- package/dist/internal/upload-retry-options.cjs +21 -0
- package/dist/internal/upload-retry-options.cjs.map +1 -0
- package/dist/internal/upload-retry-options.d.cts +12 -0
- package/dist/internal/upload-retry-options.d.cts.map +1 -0
- package/dist/internal/upload-retry-options.d.ts +12 -0
- package/dist/internal/upload-retry-options.d.ts.map +1 -0
- package/dist/internal/upload-retry-options.js +21 -0
- package/dist/internal/upload-retry-options.js.map +1 -0
- package/dist/internal/url-redaction.cjs +31 -0
- package/dist/internal/url-redaction.cjs.map +1 -0
- package/dist/internal/url-redaction.d.cts +17 -0
- package/dist/internal/url-redaction.d.cts.map +1 -0
- package/dist/internal/url-redaction.d.ts +17 -0
- package/dist/internal/url-redaction.d.ts.map +1 -0
- package/dist/internal/url-redaction.js +31 -0
- package/dist/internal/url-redaction.js.map +1 -0
- package/dist/notifications/index.cjs +4 -6
- package/dist/notifications/index.d.cts +1 -1
- package/dist/notifications/index.d.cts.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +1 -6
- package/dist/notifications/webhook.cjs +195 -85
- package/dist/notifications/webhook.cjs.map +1 -1
- package/dist/notifications/webhook.d.cts.map +1 -1
- package/dist/notifications/webhook.d.ts.map +1 -1
- package/dist/notifications/webhook.js +195 -87
- package/dist/notifications/webhook.js.map +1 -1
- package/dist/object.cjs +253 -210
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.cts +13 -57
- package/dist/object.d.cts.map +1 -1
- package/dist/object.d.ts +13 -57
- package/dist/object.d.ts.map +1 -1
- package/dist/object.js +249 -206
- 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 +175 -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 +175 -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 +255 -0
- package/dist/partner/client.cjs.map +1 -0
- package/dist/partner/client.d.cts +335 -0
- package/dist/partner/client.d.cts.map +1 -0
- package/dist/partner/client.d.ts +335 -0
- package/dist/partner/client.d.ts.map +1 -0
- package/dist/partner/client.js +255 -0
- package/dist/partner/client.js.map +1 -0
- package/dist/partner/endpoint-url.cjs +108 -0
- package/dist/partner/endpoint-url.cjs.map +1 -0
- package/dist/partner/endpoint-url.d.cts +72 -0
- package/dist/partner/endpoint-url.d.cts.map +1 -0
- package/dist/partner/endpoint-url.d.ts +72 -0
- package/dist/partner/endpoint-url.d.ts.map +1 -0
- package/dist/partner/endpoint-url.js +105 -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 +18 -0
- package/dist/partner/index.d.cts +23 -0
- package/dist/partner/index.d.cts.map +1 -0
- package/dist/partner/index.d.ts +23 -0
- package/dist/partner/index.d.ts.map +1 -0
- package/dist/partner/index.js +7 -0
- package/dist/partner/raw.cjs +392 -0
- package/dist/partner/raw.cjs.map +1 -0
- package/dist/partner/raw.d.cts +223 -0
- package/dist/partner/raw.d.cts.map +1 -0
- package/dist/partner/raw.d.ts +223 -0
- package/dist/partner/raw.d.ts.map +1 -0
- package/dist/partner/raw.js +390 -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 +267 -0
- package/dist/partner/redaction.cjs.map +1 -0
- package/dist/partner/redaction.d.cts +124 -0
- package/dist/partner/redaction.d.cts.map +1 -0
- package/dist/partner/redaction.d.ts +124 -0
- package/dist/partner/redaction.d.ts.map +1 -0
- package/dist/partner/redaction.js +257 -0
- package/dist/partner/redaction.js.map +1 -0
- package/dist/raw/encoding.cjs +74 -35
- package/dist/raw/encoding.cjs.map +1 -1
- package/dist/raw/encoding.js +74 -38
- package/dist/raw/encoding.js.map +1 -1
- package/dist/raw/index.cjs +740 -587
- package/dist/raw/index.cjs.map +1 -1
- package/dist/raw/index.d.cts +126 -19
- package/dist/raw/index.d.cts.map +1 -1
- package/dist/raw/index.d.ts +126 -19
- package/dist/raw/index.d.ts.map +1 -1
- package/dist/raw/index.js +736 -589
- 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/index.cjs +355 -18
- package/dist/s3/index.cjs.map +1 -1
- package/dist/s3/index.d.cts +233 -5
- package/dist/s3/index.d.cts.map +1 -1
- package/dist/s3/index.d.ts +233 -5
- package/dist/s3/index.d.ts.map +1 -1
- package/dist/s3/index.js +351 -22
- package/dist/s3/index.js.map +1 -1
- package/dist/s3/sigv4.cjs +154 -0
- package/dist/s3/sigv4.cjs.map +1 -0
- package/dist/s3/sigv4.d.cts +43 -0
- package/dist/s3/sigv4.d.cts.map +1 -0
- package/dist/s3/sigv4.d.ts +43 -0
- package/dist/s3/sigv4.d.ts.map +1 -0
- package/dist/s3/sigv4.js +153 -0
- package/dist/s3/sigv4.js.map +1 -0
- package/dist/s3/validation.cjs +69 -0
- package/dist/s3/validation.cjs.map +1 -0
- package/dist/s3/validation.d.cts +43 -0
- package/dist/s3/validation.d.cts.map +1 -0
- package/dist/s3/validation.d.ts +43 -0
- package/dist/s3/validation.d.ts.map +1 -0
- package/dist/s3/validation.js +66 -0
- package/dist/s3/validation.js.map +1 -0
- package/dist/simulator/capabilities.cjs +63 -48
- package/dist/simulator/capabilities.cjs.map +1 -1
- package/dist/simulator/capabilities.js +63 -49
- package/dist/simulator/capabilities.js.map +1 -1
- package/dist/simulator/index.cjs +3114 -1547
- package/dist/simulator/index.cjs.map +1 -1
- package/dist/simulator/index.d.cts +186 -20
- package/dist/simulator/index.d.cts.map +1 -1
- package/dist/simulator/index.d.ts +186 -20
- package/dist/simulator/index.d.ts.map +1 -1
- package/dist/simulator/index.js +3098 -1545
- package/dist/simulator/index.js.map +1 -1
- package/dist/simulator/partner.cjs +719 -0
- package/dist/simulator/partner.cjs.map +1 -0
- package/dist/simulator/partner.d.cts +183 -0
- package/dist/simulator/partner.d.cts.map +1 -0
- package/dist/simulator/partner.d.ts +183 -0
- package/dist/simulator/partner.d.ts.map +1 -0
- package/dist/simulator/partner.js +718 -0
- package/dist/simulator/partner.js.map +1 -0
- package/dist/simulator/validation.cjs +772 -157
- package/dist/simulator/validation.cjs.map +1 -1
- package/dist/simulator/validation.d.cts +120 -21
- package/dist/simulator/validation.d.cts.map +1 -1
- package/dist/simulator/validation.d.ts +120 -21
- package/dist/simulator/validation.d.ts.map +1 -1
- package/dist/simulator/validation.js +755 -167
- package/dist/simulator/validation.js.map +1 -1
- package/dist/streams/collect.cjs +74 -24
- package/dist/streams/collect.cjs.map +1 -1
- package/dist/streams/collect.d.cts +14 -1
- package/dist/streams/collect.d.cts.map +1 -1
- package/dist/streams/collect.d.ts +14 -1
- package/dist/streams/collect.d.ts.map +1 -1
- package/dist/streams/collect.js +74 -25
- package/dist/streams/collect.js.map +1 -1
- package/dist/streams/file-source.cjs +287 -0
- package/dist/streams/file-source.cjs.map +1 -0
- package/dist/streams/file-source.d.cts +96 -0
- package/dist/streams/file-source.d.cts.map +1 -0
- package/dist/streams/file-source.d.ts +96 -0
- package/dist/streams/file-source.d.ts.map +1 -0
- package/dist/streams/file-source.js +286 -0
- package/dist/streams/file-source.js.map +1 -0
- package/dist/streams/hash.cjs +207 -115
- package/dist/streams/hash.cjs.map +1 -1
- package/dist/streams/hash.d.cts +5 -4
- package/dist/streams/hash.d.cts.map +1 -1
- package/dist/streams/hash.d.ts +5 -4
- package/dist/streams/hash.d.ts.map +1 -1
- package/dist/streams/hash.js +208 -95
- package/dist/streams/hash.js.map +1 -1
- package/dist/streams/index.cjs +12 -12
- package/dist/streams/index.d.cts +3 -3
- package/dist/streams/index.d.cts.map +1 -1
- package/dist/streams/index.d.ts +3 -3
- package/dist/streams/index.d.ts.map +1 -1
- package/dist/streams/index.js +3 -11
- package/dist/streams/progress.cjs +60 -46
- package/dist/streams/progress.cjs.map +1 -1
- package/dist/streams/progress.js +60 -46
- package/dist/streams/progress.js.map +1 -1
- package/dist/streams/source.cjs +317 -146
- package/dist/streams/source.cjs.map +1 -1
- package/dist/streams/source.d.cts +56 -18
- package/dist/streams/source.d.cts.map +1 -1
- package/dist/streams/source.d.ts +56 -18
- package/dist/streams/source.d.ts.map +1 -1
- package/dist/streams/source.js +313 -149
- package/dist/streams/source.js.map +1 -1
- package/dist/sync/actions/index.cjs +236 -184
- package/dist/sync/actions/index.cjs.map +1 -1
- package/dist/sync/actions/index.d.cts +29 -21
- package/dist/sync/actions/index.d.cts.map +1 -1
- package/dist/sync/actions/index.d.ts +29 -21
- package/dist/sync/actions/index.d.ts.map +1 -1
- package/dist/sync/actions/index.js +236 -190
- package/dist/sync/actions/index.js.map +1 -1
- package/dist/sync/b2-sha1-reader.cjs +152 -0
- package/dist/sync/b2-sha1-reader.cjs.map +1 -0
- package/dist/sync/b2-sha1-reader.d.cts +58 -0
- package/dist/sync/b2-sha1-reader.d.cts.map +1 -0
- package/dist/sync/b2-sha1-reader.d.ts +58 -0
- package/dist/sync/b2-sha1-reader.d.ts.map +1 -0
- package/dist/sync/b2-sha1-reader.js +149 -0
- package/dist/sync/b2-sha1-reader.js.map +1 -0
- package/dist/sync/download-staging.cjs +266 -0
- package/dist/sync/download-staging.cjs.map +1 -0
- package/dist/sync/download-staging.d.cts +55 -0
- package/dist/sync/download-staging.d.cts.map +1 -0
- package/dist/sync/download-staging.d.ts +55 -0
- package/dist/sync/download-staging.d.ts.map +1 -0
- package/dist/sync/download-staging.js +260 -0
- package/dist/sync/download-staging.js.map +1 -0
- package/dist/sync/filesystem-errors.cjs +32 -0
- package/dist/sync/filesystem-errors.cjs.map +1 -0
- package/dist/sync/filesystem-errors.d.cts +8 -0
- package/dist/sync/filesystem-errors.d.cts.map +1 -0
- package/dist/sync/filesystem-errors.d.ts +8 -0
- package/dist/sync/filesystem-errors.d.ts.map +1 -0
- package/dist/sync/filesystem-errors.js +32 -0
- package/dist/sync/filesystem-errors.js.map +1 -0
- package/dist/sync/filters.cjs +217 -0
- package/dist/sync/filters.cjs.map +1 -0
- package/dist/sync/filters.d.cts +51 -0
- package/dist/sync/filters.d.cts.map +1 -0
- package/dist/sync/filters.d.ts +51 -0
- package/dist/sync/filters.d.ts.map +1 -0
- package/dist/sync/filters.js +213 -0
- package/dist/sync/filters.js.map +1 -0
- package/dist/sync/index.cjs +39 -22
- package/dist/sync/index.d.cts +14 -9
- package/dist/sync/index.d.cts.map +1 -1
- package/dist/sync/index.d.ts +14 -9
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +9 -20
- package/dist/sync/local-file-identity.cjs +61 -0
- package/dist/sync/local-file-identity.cjs.map +1 -0
- package/dist/sync/local-file-identity.d.cts +37 -0
- package/dist/sync/local-file-identity.d.cts.map +1 -0
- package/dist/sync/local-file-identity.d.ts +37 -0
- package/dist/sync/local-file-identity.d.ts.map +1 -0
- package/dist/sync/local-file-identity.js +60 -0
- package/dist/sync/local-file-identity.js.map +1 -0
- package/dist/sync/local-file-io.cjs +369 -0
- package/dist/sync/local-file-io.cjs.map +1 -0
- package/dist/sync/local-file-io.d.cts +76 -0
- package/dist/sync/local-file-io.d.cts.map +1 -0
- package/dist/sync/local-file-io.d.ts +76 -0
- package/dist/sync/local-file-io.d.ts.map +1 -0
- package/dist/sync/local-file-io.js +365 -0
- package/dist/sync/local-file-io.js.map +1 -0
- package/dist/sync/local-filesystem-root.cjs +27 -0
- package/dist/sync/local-filesystem-root.cjs.map +1 -0
- package/dist/sync/local-filesystem-root.d.cts +18 -0
- package/dist/sync/local-filesystem-root.d.cts.map +1 -0
- package/dist/sync/local-filesystem-root.d.ts +18 -0
- package/dist/sync/local-filesystem-root.d.ts.map +1 -0
- package/dist/sync/local-filesystem-root.js +26 -0
- package/dist/sync/local-filesystem-root.js.map +1 -0
- package/dist/sync/local-sha1.cjs +110 -0
- package/dist/sync/local-sha1.cjs.map +1 -0
- package/dist/sync/local-sha1.d.cts +31 -0
- package/dist/sync/local-sha1.d.cts.map +1 -0
- package/dist/sync/local-sha1.d.ts +31 -0
- package/dist/sync/local-sha1.d.ts.map +1 -0
- package/dist/sync/local-sha1.js +109 -0
- package/dist/sync/local-sha1.js.map +1 -0
- package/dist/sync/pairing.cjs +118 -29
- package/dist/sync/pairing.cjs.map +1 -1
- package/dist/sync/pairing.d.cts +7 -2
- package/dist/sync/pairing.d.cts.map +1 -1
- package/dist/sync/pairing.d.ts +7 -2
- package/dist/sync/pairing.d.ts.map +1 -1
- package/dist/sync/pairing.js +120 -31
- package/dist/sync/pairing.js.map +1 -1
- package/dist/sync/path-order.cjs +30 -0
- package/dist/sync/path-order.cjs.map +1 -0
- package/dist/sync/path-order.d.cts +28 -0
- package/dist/sync/path-order.d.cts.map +1 -0
- package/dist/sync/path-order.d.ts +28 -0
- package/dist/sync/path-order.d.ts.map +1 -0
- package/dist/sync/path-order.js +29 -0
- package/dist/sync/path-order.js.map +1 -0
- package/dist/sync/path-safety.cjs +111 -0
- package/dist/sync/path-safety.cjs.map +1 -0
- package/dist/sync/path-safety.d.cts +78 -0
- package/dist/sync/path-safety.d.cts.map +1 -0
- package/dist/sync/path-safety.d.ts +78 -0
- package/dist/sync/path-safety.d.ts.map +1 -0
- package/dist/sync/path-safety.js +105 -0
- package/dist/sync/path-safety.js.map +1 -0
- package/dist/sync/paths.d.cts +19 -0
- package/dist/sync/paths.d.cts.map +1 -0
- package/dist/sync/paths.d.ts +19 -0
- package/dist/sync/paths.d.ts.map +1 -0
- package/dist/sync/policies/compare.cjs +391 -11
- package/dist/sync/policies/compare.cjs.map +1 -1
- package/dist/sync/policies/compare.d.cts +100 -2
- package/dist/sync/policies/compare.d.cts.map +1 -1
- package/dist/sync/policies/compare.d.ts +100 -2
- package/dist/sync/policies/compare.d.ts.map +1 -1
- package/dist/sync/policies/compare.js +389 -13
- package/dist/sync/policies/compare.js.map +1 -1
- package/dist/sync/policies/index.cjs +70 -65
- package/dist/sync/policies/index.cjs.map +1 -1
- package/dist/sync/policies/index.d.cts +35 -6
- package/dist/sync/policies/index.d.cts.map +1 -1
- package/dist/sync/policies/index.d.ts +35 -6
- package/dist/sync/policies/index.d.ts.map +1 -1
- package/dist/sync/policies/index.js +70 -65
- package/dist/sync/policies/index.js.map +1 -1
- package/dist/sync/prefix.cjs +96 -0
- package/dist/sync/prefix.cjs.map +1 -0
- package/dist/sync/prefix.d.cts +55 -0
- package/dist/sync/prefix.d.cts.map +1 -0
- package/dist/sync/prefix.d.ts +55 -0
- package/dist/sync/prefix.d.ts.map +1 -0
- package/dist/sync/prefix.js +92 -0
- package/dist/sync/prefix.js.map +1 -0
- package/dist/sync/regexp-safety.cjs +192 -0
- package/dist/sync/regexp-safety.cjs.map +1 -0
- package/dist/sync/regexp-safety.d.cts +29 -0
- package/dist/sync/regexp-safety.d.cts.map +1 -0
- package/dist/sync/regexp-safety.d.ts +29 -0
- package/dist/sync/regexp-safety.d.ts.map +1 -0
- package/dist/sync/regexp-safety.js +190 -0
- package/dist/sync/regexp-safety.js.map +1 -0
- package/dist/sync/scan-events.cjs +33 -0
- package/dist/sync/scan-events.cjs.map +1 -0
- package/dist/sync/scan-events.d.cts +17 -0
- package/dist/sync/scan-events.d.cts.map +1 -0
- package/dist/sync/scan-events.d.ts +17 -0
- package/dist/sync/scan-events.d.ts.map +1 -0
- package/dist/sync/scan-events.js +32 -0
- package/dist/sync/scan-events.js.map +1 -0
- package/dist/sync/scan-limit.cjs +33 -0
- package/dist/sync/scan-limit.cjs.map +1 -0
- package/dist/sync/scan-limit.d.cts +21 -0
- package/dist/sync/scan-limit.d.cts.map +1 -0
- package/dist/sync/scan-limit.d.ts +21 -0
- package/dist/sync/scan-limit.d.ts.map +1 -0
- package/dist/sync/scan-limit.js +31 -0
- package/dist/sync/scan-limit.js.map +1 -0
- package/dist/sync/scanners/b2.cjs +239 -55
- package/dist/sync/scanners/b2.cjs.map +1 -1
- package/dist/sync/scanners/b2.d.cts +26 -7
- package/dist/sync/scanners/b2.d.cts.map +1 -1
- package/dist/sync/scanners/b2.d.ts +26 -7
- package/dist/sync/scanners/b2.d.ts.map +1 -1
- package/dist/sync/scanners/b2.js +239 -55
- package/dist/sync/scanners/b2.js.map +1 -1
- package/dist/sync/scanners/local.cjs +215 -56
- package/dist/sync/scanners/local.cjs.map +1 -1
- package/dist/sync/scanners/local.d.cts +22 -7
- package/dist/sync/scanners/local.d.cts.map +1 -1
- package/dist/sync/scanners/local.d.ts +22 -7
- package/dist/sync/scanners/local.d.ts.map +1 -1
- package/dist/sync/scanners/local.js +216 -57
- package/dist/sync/scanners/local.js.map +1 -1
- package/dist/sync/sha1-metadata.cjs +94 -0
- package/dist/sync/sha1-metadata.cjs.map +1 -0
- package/dist/sync/sha1-metadata.d.cts +82 -0
- package/dist/sync/sha1-metadata.d.cts.map +1 -0
- package/dist/sync/sha1-metadata.d.ts +82 -0
- package/dist/sync/sha1-metadata.d.ts.map +1 -0
- package/dist/sync/sha1-metadata.js +89 -0
- package/dist/sync/sha1-metadata.js.map +1 -0
- package/dist/sync/sha1-options.cjs +23 -0
- package/dist/sync/sha1-options.cjs.map +1 -0
- package/dist/sync/sha1-options.d.cts +14 -0
- package/dist/sync/sha1-options.d.cts.map +1 -0
- package/dist/sync/sha1-options.d.ts +14 -0
- package/dist/sync/sha1-options.d.ts.map +1 -0
- package/dist/sync/sha1-options.js +21 -0
- package/dist/sync/sha1-options.js.map +1 -0
- package/dist/sync/synchronizer.cjs +783 -197
- package/dist/sync/synchronizer.cjs.map +1 -1
- package/dist/sync/synchronizer.d.cts +47 -1
- package/dist/sync/synchronizer.d.cts.map +1 -1
- package/dist/sync/synchronizer.d.ts +47 -1
- package/dist/sync/synchronizer.d.ts.map +1 -1
- package/dist/sync/synchronizer.js +780 -173
- package/dist/sync/synchronizer.js.map +1 -1
- package/dist/sync/types.d.cts +208 -16
- package/dist/sync/types.d.cts.map +1 -1
- package/dist/sync/types.d.ts +208 -16
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/types/auth.cjs +80 -56
- package/dist/types/auth.cjs.map +1 -1
- package/dist/types/auth.d.cts +71 -9
- package/dist/types/auth.d.cts.map +1 -1
- package/dist/types/auth.d.ts +71 -9
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/auth.js +81 -57
- package/dist/types/auth.js.map +1 -1
- package/dist/types/backup.d.cts +80 -0
- package/dist/types/backup.d.cts.map +1 -0
- package/dist/types/backup.d.ts +80 -0
- package/dist/types/backup.d.ts.map +1 -0
- package/dist/types/bucket.cjs +74 -38
- package/dist/types/bucket.cjs.map +1 -1
- package/dist/types/bucket.d.cts +4 -2
- package/dist/types/bucket.d.cts.map +1 -1
- package/dist/types/bucket.d.ts +4 -2
- package/dist/types/bucket.d.ts.map +1 -1
- package/dist/types/bucket.js +75 -41
- 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 +98 -0
- package/dist/types/download.d.cts.map +1 -1
- package/dist/types/download.d.ts +98 -0
- 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 +194 -328
- package/dist/types/encryption.cjs.map +1 -1
- package/dist/types/encryption.d.cts +48 -0
- package/dist/types/encryption.d.cts.map +1 -1
- package/dist/types/encryption.d.ts +48 -0
- package/dist/types/encryption.d.ts.map +1 -1
- package/dist/types/encryption.js +192 -311
- package/dist/types/encryption.js.map +1 -1
- package/dist/types/errors.cjs +56 -0
- package/dist/types/errors.cjs.map +1 -0
- package/dist/types/errors.d.cts +13 -4
- package/dist/types/errors.d.cts.map +1 -1
- package/dist/types/errors.d.ts +13 -4
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +56 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/file.cjs +36 -19
- package/dist/types/file.cjs.map +1 -1
- package/dist/types/file.d.cts +17 -4
- package/dist/types/file.d.cts.map +1 -1
- package/dist/types/file.d.ts +17 -4
- package/dist/types/file.d.ts.map +1 -1
- package/dist/types/file.js +37 -21
- package/dist/types/file.js.map +1 -1
- package/dist/types/ids.cjs +83 -9
- 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 +82 -16
- package/dist/types/ids.js.map +1 -1
- package/dist/types/index.d.cts +18 -13
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +18 -13
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/key.d.cts +44 -8
- package/dist/types/key.d.cts.map +1 -1
- package/dist/types/key.d.ts +44 -8
- package/dist/types/key.d.ts.map +1 -1
- package/dist/types/lock.cjs +33 -13
- 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 +34 -15
- package/dist/types/lock.js.map +1 -1
- package/dist/types/notifications.cjs +44 -22
- package/dist/types/notifications.cjs.map +1 -1
- package/dist/types/notifications.d.cts +5 -3
- package/dist/types/notifications.d.cts.map +1 -1
- package/dist/types/notifications.d.ts +5 -3
- package/dist/types/notifications.d.ts.map +1 -1
- package/dist/types/notifications.js +45 -23
- 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 +394 -0
- package/dist/types/partner.d.cts.map +1 -0
- package/dist/types/partner.d.ts +394 -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 +53 -6
- package/dist/types/upload.d.cts.map +1 -1
- package/dist/types/upload.d.ts +53 -6
- package/dist/types/upload.d.ts.map +1 -1
- package/dist/upload/abort-scope.cjs +46 -0
- package/dist/upload/abort-scope.cjs.map +1 -0
- package/dist/upload/abort-scope.d.cts +26 -0
- package/dist/upload/abort-scope.d.cts.map +1 -0
- package/dist/upload/abort-scope.d.ts +26 -0
- package/dist/upload/abort-scope.d.ts.map +1 -0
- package/dist/upload/abort-scope.js +45 -0
- package/dist/upload/abort-scope.js.map +1 -0
- package/dist/upload/cancel.cjs +183 -8
- package/dist/upload/cancel.cjs.map +1 -1
- package/dist/upload/cancel.d.cts +110 -2
- package/dist/upload/cancel.d.cts.map +1 -1
- package/dist/upload/cancel.d.ts +110 -2
- package/dist/upload/cancel.d.ts.map +1 -1
- package/dist/upload/cancel.js +178 -9
- package/dist/upload/cancel.js.map +1 -1
- package/dist/upload/concurrency.cjs +79 -52
- package/dist/upload/concurrency.cjs.map +1 -1
- package/dist/upload/concurrency.js +79 -53
- package/dist/upload/concurrency.js.map +1 -1
- package/dist/upload/finish.cjs +54 -0
- package/dist/upload/finish.cjs.map +1 -0
- package/dist/upload/finish.d.cts +26 -0
- package/dist/upload/finish.d.cts.map +1 -0
- package/dist/upload/finish.d.ts +26 -0
- package/dist/upload/finish.d.ts.map +1 -0
- package/dist/upload/finish.js +54 -0
- package/dist/upload/finish.js.map +1 -0
- package/dist/upload/large.cjs +305 -218
- package/dist/upload/large.cjs.map +1 -1
- package/dist/upload/large.d.cts +90 -9
- package/dist/upload/large.d.cts.map +1 -1
- package/dist/upload/large.d.ts +90 -9
- package/dist/upload/large.d.ts.map +1 -1
- package/dist/upload/large.js +305 -218
- package/dist/upload/large.js.map +1 -1
- package/dist/upload/options.cjs +28 -0
- package/dist/upload/options.cjs.map +1 -0
- package/dist/upload/options.d.cts +116 -0
- package/dist/upload/options.d.cts.map +1 -0
- package/dist/upload/options.d.ts +116 -0
- package/dist/upload/options.d.ts.map +1 -0
- package/dist/upload/options.js +27 -0
- package/dist/upload/options.js.map +1 -0
- package/dist/upload/resume.cjs +334 -33
- package/dist/upload/resume.cjs.map +1 -1
- package/dist/upload/resume.d.cts +84 -12
- package/dist/upload/resume.d.cts.map +1 -1
- package/dist/upload/resume.d.ts +84 -12
- package/dist/upload/resume.d.ts.map +1 -1
- package/dist/upload/resume.js +331 -33
- package/dist/upload/resume.js.map +1 -1
- package/dist/upload/retry.cjs +191 -0
- package/dist/upload/retry.cjs.map +1 -0
- package/dist/upload/retry.d.cts +127 -0
- package/dist/upload/retry.d.cts.map +1 -0
- package/dist/upload/retry.d.ts +127 -0
- package/dist/upload/retry.d.ts.map +1 -0
- package/dist/upload/retry.js +187 -0
- package/dist/upload/retry.js.map +1 -0
- package/dist/upload/single.cjs +69 -44
- package/dist/upload/single.cjs.map +1 -1
- package/dist/upload/single.d.cts +8 -1
- package/dist/upload/single.d.cts.map +1 -1
- package/dist/upload/single.d.ts +8 -1
- package/dist/upload/single.d.ts.map +1 -1
- package/dist/upload/single.js +69 -44
- package/dist/upload/single.js.map +1 -1
- package/dist/upload/stream.cjs +319 -193
- package/dist/upload/stream.cjs.map +1 -1
- package/dist/upload/stream.d.cts +9 -1
- package/dist/upload/stream.d.cts.map +1 -1
- package/dist/upload/stream.d.ts +9 -1
- package/dist/upload/stream.d.ts.map +1 -1
- package/dist/upload/stream.js +318 -192
- 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/best-effort.cjs +42 -8
- package/dist/util/best-effort.cjs.map +1 -1
- package/dist/util/best-effort.d.cts +2 -1
- package/dist/util/best-effort.d.cts.map +1 -1
- package/dist/util/best-effort.d.ts +2 -1
- package/dist/util/best-effort.d.ts.map +1 -1
- package/dist/util/best-effort.js +43 -9
- package/dist/util/best-effort.js.map +1 -1
- package/dist/util/bytes.cjs +23 -0
- package/dist/util/bytes.cjs.map +1 -0
- package/dist/util/bytes.d.cts +15 -0
- package/dist/util/bytes.d.cts.map +1 -0
- package/dist/util/bytes.d.ts +15 -0
- package/dist/util/bytes.d.ts.map +1 -0
- package/dist/util/bytes.js +23 -0
- package/dist/util/bytes.js.map +1 -0
- package/dist/util/crypto.cjs +68 -0
- package/dist/util/crypto.cjs.map +1 -0
- package/dist/util/crypto.d.cts +26 -0
- package/dist/util/crypto.d.cts.map +1 -0
- package/dist/util/crypto.d.ts +26 -0
- package/dist/util/crypto.d.ts.map +1 -0
- package/dist/util/crypto.js +66 -0
- package/dist/util/crypto.js.map +1 -0
- package/dist/util/defaults.cjs +28 -9
- 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 +28 -11
- package/dist/util/defaults.js.map +1 -1
- package/dist/util/error-reason.cjs +41 -0
- package/dist/util/error-reason.cjs.map +1 -0
- package/dist/util/error-reason.d.cts +9 -0
- package/dist/util/error-reason.d.cts.map +1 -0
- package/dist/util/error-reason.d.ts +9 -0
- package/dist/util/error-reason.d.ts.map +1 -0
- package/dist/util/error-reason.js +41 -0
- package/dist/util/error-reason.js.map +1 -0
- package/dist/util/http.cjs +23 -0
- package/dist/util/http.cjs.map +1 -0
- package/dist/util/http.d.cts +13 -0
- package/dist/util/http.d.cts.map +1 -0
- package/dist/util/http.d.ts +13 -0
- package/dist/util/http.d.ts.map +1 -0
- package/dist/util/http.js +23 -0
- package/dist/util/http.js.map +1 -0
- 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 +66 -7
- 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 +67 -10
- package/dist/util/normalize.js.map +1 -1
- package/dist/util/paginator.cjs +69 -14
- 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 +70 -16
- package/dist/util/paginator.js.map +1 -1
- package/dist/util/plan-ranges.cjs +47 -22
- package/dist/util/plan-ranges.cjs.map +1 -1
- package/dist/util/plan-ranges.js +48 -24
- package/dist/util/plan-ranges.js.map +1 -1
- package/dist/util/sha1.cjs +27 -0
- package/dist/util/sha1.cjs.map +1 -0
- package/dist/util/sha1.d.cts +17 -0
- package/dist/util/sha1.d.cts.map +1 -0
- package/dist/util/sha1.d.ts +17 -0
- package/dist/util/sha1.d.ts.map +1 -0
- package/dist/util/sha1.js +26 -0
- package/dist/util/sha1.js.map +1 -0
- package/dist/util/text-codec.cjs +29 -5
- package/dist/util/text-codec.cjs.map +1 -1
- package/dist/util/text-codec.js +30 -7
- package/dist/util/text-codec.js.map +1 -1
- package/dist/util/to-error.cjs +18 -4
- package/dist/util/to-error.cjs.map +1 -1
- package/dist/util/to-error.js +19 -5
- package/dist/util/to-error.js.map +1 -1
- package/dist/version.cjs +17 -5
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +3 -3
- package/dist/version.d.ts +3 -3
- package/dist/version.js +19 -6
- package/dist/version.js.map +1 -1
- package/package.json +45 -20
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/notifications/index.cjs.map +0 -1
- package/dist/notifications/index.js.map +0 -1
- package/dist/package.json.cjs +0 -9
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -9
- package/dist/package.json.js.map +0 -1
- package/dist/streams/index.cjs.map +0 -1
- package/dist/streams/index.js.map +0 -1
- package/dist/sync/index.cjs.map +0 -1
- package/dist/sync/index.js.map +0 -1
package/dist/types/key.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../src/types/key.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErE,
|
|
1
|
+
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../src/types/key.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,gBA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AM,CAAA;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAA;CAClD;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,CAAA;IACxC,2FAA2F;IAC3F,QAAQ,CAAC,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvD;AAED,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAA;CAC5C"}
|
package/dist/types/lock.cjs
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/types/lock.ts
|
|
2
|
+
/**
|
|
3
|
+
* Named constants for the file-level Object Lock retention mode.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* await object.setRetention(fileId, {
|
|
8
|
+
* mode: RetentionMode.Compliance,
|
|
9
|
+
* retainUntilTimestamp: Date.now() + 86_400_000,
|
|
10
|
+
* })
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
var RetentionMode = {
|
|
14
|
+
/** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */
|
|
15
|
+
Compliance: "compliance",
|
|
16
|
+
/** Locked: can be shortened by callers holding the `bypassGovernance` capability. */
|
|
17
|
+
Governance: "governance"
|
|
8
18
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Named constants for the file legal-hold status.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* await object.setLegalHold(fileId, LegalHoldValue.On)
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
var LegalHoldValue = {
|
|
28
|
+
/** Apply the legal hold. */
|
|
29
|
+
On: "on",
|
|
30
|
+
/** Remove the legal hold. */
|
|
31
|
+
Off: "off"
|
|
14
32
|
};
|
|
33
|
+
//#endregion
|
|
15
34
|
exports.LegalHoldValue = LegalHoldValue;
|
|
16
35
|
exports.RetentionMode = RetentionMode;
|
|
17
|
-
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=lock.cjs.map
|
package/dist/types/lock.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.cjs","sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"
|
|
1
|
+
{"version":3,"file":"lock.cjs","names":[],"sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/** Object Lock retention settings as returned by readable B2 response metadata. */\nexport interface ReadableFileRetention {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null when none are set or unreadable. */\n readonly value: FileRetentionValue | null\n}\n\n/** Legal hold status as returned by readable B2 response metadata. */\nexport interface ReadableLegalHold {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null when none is set or unreadable. */\n readonly value: LegalHoldValue | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,gBAAgB;;CAE3B,YAAY;;CAEZ,YAAY;AACd;;;;;;;;;AAaA,IAAa,iBAAiB;;CAE5B,IAAI;;CAEJ,KAAK;AACP"}
|
package/dist/types/lock.d.cts
CHANGED
|
@@ -41,6 +41,20 @@ export interface FileRetentionValue {
|
|
|
41
41
|
/** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */
|
|
42
42
|
readonly retainUntilTimestamp: number | null;
|
|
43
43
|
}
|
|
44
|
+
/** Object Lock retention settings as returned by readable B2 response metadata. */
|
|
45
|
+
export interface ReadableFileRetention {
|
|
46
|
+
/** Whether the caller is authorized to read retention settings. */
|
|
47
|
+
readonly isClientAuthorizedToRead: boolean;
|
|
48
|
+
/** Retention settings, or null when none are set or unreadable. */
|
|
49
|
+
readonly value: FileRetentionValue | null;
|
|
50
|
+
}
|
|
51
|
+
/** Legal hold status as returned by readable B2 response metadata. */
|
|
52
|
+
export interface ReadableLegalHold {
|
|
53
|
+
/** Whether the caller is authorized to read legal hold status. */
|
|
54
|
+
readonly isClientAuthorizedToRead: boolean;
|
|
55
|
+
/** Legal hold value, or null when none is set or unreadable. */
|
|
56
|
+
readonly value: LegalHoldValue | null;
|
|
57
|
+
}
|
|
44
58
|
/**
|
|
45
59
|
* Request parameters for the `b2_update_file_retention` API call.
|
|
46
60
|
* Updates the Object Lock retention settings on a file version.
|
|
@@ -1 +1 @@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ACnC"}
|
package/dist/types/lock.d.ts
CHANGED
|
@@ -41,6 +41,20 @@ export interface FileRetentionValue {
|
|
|
41
41
|
/** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */
|
|
42
42
|
readonly retainUntilTimestamp: number | null;
|
|
43
43
|
}
|
|
44
|
+
/** Object Lock retention settings as returned by readable B2 response metadata. */
|
|
45
|
+
export interface ReadableFileRetention {
|
|
46
|
+
/** Whether the caller is authorized to read retention settings. */
|
|
47
|
+
readonly isClientAuthorizedToRead: boolean;
|
|
48
|
+
/** Retention settings, or null when none are set or unreadable. */
|
|
49
|
+
readonly value: FileRetentionValue | null;
|
|
50
|
+
}
|
|
51
|
+
/** Legal hold status as returned by readable B2 response metadata. */
|
|
52
|
+
export interface ReadableLegalHold {
|
|
53
|
+
/** Whether the caller is authorized to read legal hold status. */
|
|
54
|
+
readonly isClientAuthorizedToRead: boolean;
|
|
55
|
+
/** Legal hold value, or null when none is set or unreadable. */
|
|
56
|
+
readonly value: LegalHoldValue | null;
|
|
57
|
+
}
|
|
44
58
|
/**
|
|
45
59
|
* Request parameters for the `b2_update_file_retention` API call.
|
|
46
60
|
* Updates the Object Lock retention settings on a file version.
|
package/dist/types/lock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/types/lock.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;IACxB,qGAAqG;;IAErG,qFAAqF;;CAE7E,CAAA;AAEV,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE9E;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;IACzB,4BAA4B;;IAE5B,6BAA6B;;CAErB,CAAA;AAEV,yEAAyE;AACzE,MAAM,MAAM,cAA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,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAA;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,kCAAkC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;CACnC;AAED,6DAA6D;AAC7D,MAAM,WAAW,2BAA2B;IAC1C,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,qCAAqC;IACrC,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAA;CAC3C;AAED,8DAA8D;AAC9D,MAAM,WAAW,2BAA2B;IAC1C,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;CACnC"}
|
package/dist/types/lock.js
CHANGED
|
@@ -1,17 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/types/lock.ts
|
|
2
|
+
/**
|
|
3
|
+
* Named constants for the file-level Object Lock retention mode.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* await object.setRetention(fileId, {
|
|
8
|
+
* mode: RetentionMode.Compliance,
|
|
9
|
+
* retainUntilTimestamp: Date.now() + 86_400_000,
|
|
10
|
+
* })
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
var RetentionMode = {
|
|
14
|
+
/** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */
|
|
15
|
+
Compliance: "compliance",
|
|
16
|
+
/** Locked: can be shortened by callers holding the `bypassGovernance` capability. */
|
|
17
|
+
Governance: "governance"
|
|
6
18
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Named constants for the file legal-hold status.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* await object.setLegalHold(fileId, LegalHoldValue.On)
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
var LegalHoldValue = {
|
|
28
|
+
/** Apply the legal hold. */
|
|
29
|
+
On: "on",
|
|
30
|
+
/** Remove the legal hold. */
|
|
31
|
+
Off: "off"
|
|
12
32
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=lock.js.map
|
|
33
|
+
//#endregion
|
|
34
|
+
export { LegalHoldValue, RetentionMode };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=lock.js.map
|
package/dist/types/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"
|
|
1
|
+
{"version":3,"file":"lock.js","names":[],"sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/** Object Lock retention settings as returned by readable B2 response metadata. */\nexport interface ReadableFileRetention {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null when none are set or unreadable. */\n readonly value: FileRetentionValue | null\n}\n\n/** Legal hold status as returned by readable B2 response metadata. */\nexport interface ReadableLegalHold {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null when none is set or unreadable. */\n readonly value: LegalHoldValue | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,gBAAgB;;CAE3B,YAAY;;CAEZ,YAAY;AACd;;;;;;;;;AAaA,IAAa,iBAAiB;;CAE5B,IAAI;;CAEJ,KAAK;AACP"}
|
|
@@ -1,24 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
//#region src/types/notifications.ts
|
|
2
|
+
/**
|
|
3
|
+
* Named constants for the B2 event types that can trigger notifications.
|
|
4
|
+
*
|
|
5
|
+
* Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to
|
|
6
|
+
* every sub-event in their category.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* await bucket.setNotificationRules([
|
|
11
|
+
* {
|
|
12
|
+
* name: 'all-uploads',
|
|
13
|
+
* eventTypes: [EventType.ObjectCreatedAll],
|
|
14
|
+
* isEnabled: true,
|
|
15
|
+
* isSuspended: false,
|
|
16
|
+
* objectNamePrefix: '',
|
|
17
|
+
* suspensionReason: '',
|
|
18
|
+
* targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },
|
|
19
|
+
* },
|
|
20
|
+
* ])
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
var EventType = {
|
|
24
|
+
/** Wildcard: any `b2:ObjectCreated:*` sub-event. */
|
|
25
|
+
ObjectCreatedAll: "b2:ObjectCreated:*",
|
|
26
|
+
/** A small-file upload (`b2_upload_file`). */
|
|
27
|
+
ObjectCreatedUpload: "b2:ObjectCreated:Upload",
|
|
28
|
+
/** A multipart upload completed (`b2_finish_large_file`). */
|
|
29
|
+
ObjectCreatedMultipartUpload: "b2:ObjectCreated:MultipartUpload",
|
|
30
|
+
/** A server-side copy (`b2_copy_file` or `b2_copy_part`). */
|
|
31
|
+
ObjectCreatedCopy: "b2:ObjectCreated:Copy",
|
|
32
|
+
/** A replica delivered via cross-region replication. */
|
|
33
|
+
ObjectCreatedReplica: "b2:ObjectCreated:Replica",
|
|
34
|
+
/** A hide marker was created (`b2_hide_file`). */
|
|
35
|
+
ObjectCreatedHide: "b2:ObjectCreated:Hide",
|
|
36
|
+
/** Wildcard: any `b2:ObjectDeleted:*` sub-event. */
|
|
37
|
+
ObjectDeletedAll: "b2:ObjectDeleted:*",
|
|
38
|
+
/** A version was permanently deleted (`b2_delete_file_version`). */
|
|
39
|
+
ObjectDeletedDelete: "b2:ObjectDeleted:Delete",
|
|
40
|
+
/** A version was removed by a lifecycle rule. */
|
|
41
|
+
ObjectDeletedLifecycleRule: "b2:ObjectDeleted:LifecycleRule"
|
|
22
42
|
};
|
|
43
|
+
//#endregion
|
|
23
44
|
exports.EventType = EventType;
|
|
24
|
-
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=notifications.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.cjs","sources":["../../src/types/notifications.ts"],"sourcesContent":["import type { BucketId } from './ids.ts'\n\n/**\n * Named constants for the B2 event types that can trigger notifications.\n *\n * Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to\n * every sub-event in their category.\n *\n * @example\n * ```ts\n * await bucket.setNotificationRules([\n * {\n * name: 'all-uploads',\n * eventTypes: [EventType.ObjectCreatedAll],\n * isEnabled: true,\n * isSuspended: false,\n * objectNamePrefix: '',\n * suspensionReason: '',\n * targetConfiguration: { targetType: '
|
|
1
|
+
{"version":3,"file":"notifications.cjs","names":[],"sources":["../../src/types/notifications.ts"],"sourcesContent":["import type { BucketId } from './ids.ts'\n\n/**\n * Named constants for the B2 event types that can trigger notifications.\n *\n * Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to\n * every sub-event in their category.\n *\n * @example\n * ```ts\n * await bucket.setNotificationRules([\n * {\n * name: 'all-uploads',\n * eventTypes: [EventType.ObjectCreatedAll],\n * isEnabled: true,\n * isSuspended: false,\n * objectNamePrefix: '',\n * suspensionReason: '',\n * targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },\n * },\n * ])\n * ```\n */\nexport const EventType = {\n /** Wildcard: any `b2:ObjectCreated:*` sub-event. */\n ObjectCreatedAll: 'b2:ObjectCreated:*',\n /** A small-file upload (`b2_upload_file`). */\n ObjectCreatedUpload: 'b2:ObjectCreated:Upload',\n /** A multipart upload completed (`b2_finish_large_file`). */\n ObjectCreatedMultipartUpload: 'b2:ObjectCreated:MultipartUpload',\n /** A server-side copy (`b2_copy_file` or `b2_copy_part`). */\n ObjectCreatedCopy: 'b2:ObjectCreated:Copy',\n /** A replica delivered via cross-region replication. */\n ObjectCreatedReplica: 'b2:ObjectCreated:Replica',\n /** A hide marker was created (`b2_hide_file`). */\n ObjectCreatedHide: 'b2:ObjectCreated:Hide',\n /** Wildcard: any `b2:ObjectDeleted:*` sub-event. */\n ObjectDeletedAll: 'b2:ObjectDeleted:*',\n /** A version was permanently deleted (`b2_delete_file_version`). */\n ObjectDeletedDelete: 'b2:ObjectDeleted:Delete',\n /** A version was removed by a lifecycle rule. */\n ObjectDeletedLifecycleRule: 'b2:ObjectDeleted:LifecycleRule',\n} as const\n\n/**\n * B2 event types that can trigger notifications. Derived from {@link EventType}.\n */\nexport type EventType = (typeof EventType)[keyof typeof EventType]\n\n/** A rule that defines which bucket events trigger webhook notifications and where they are sent. */\nexport interface EventNotificationRule {\n /** Event types that trigger this notification rule. */\n readonly eventTypes: readonly EventType[]\n /** Whether this rule is actively sending notifications. */\n readonly isEnabled: boolean\n /** Whether B2 has suspended this rule due to delivery failures. */\n readonly isSuspended: boolean\n /** Maximum number of events B2 may include in a single webhook request. */\n readonly maxEventsPerBatch?: number\n /** Unique name identifying this rule within the bucket. */\n readonly name: string\n /** Only events for objects with this name prefix trigger the rule. Empty string matches all objects. */\n readonly objectNamePrefix: string\n /** Reason for suspension, or empty string if not suspended. */\n readonly suspensionReason: string\n /** Webhook target configuration. */\n readonly targetConfiguration: {\n /** Target type (`'webhook'` for webhook delivery). */\n readonly targetType: 'webhook'\n /** Webhook URL that receives the event notifications. */\n readonly url: string\n /** Optional HMAC-SHA256 secret used to sign notification payloads for verification. */\n readonly hmacSha256SigningSecret?: string\n /** Optional custom headers included in webhook requests. */\n readonly customHeaders?: Record<string, string>\n }\n}\n\n/** Request parameters for the `b2_get_bucket_notification_rules` API call. */\nexport interface GetBucketNotificationRulesRequest {\n /** Bucket to get notification rules for. */\n readonly bucketId: BucketId\n}\n\n/** Response from the `b2_get_bucket_notification_rules` API call. */\nexport interface GetBucketNotificationRulesResponse {\n /** Bucket these rules belong to. */\n readonly bucketId: BucketId\n /** Array of event notification rules configured on the bucket. */\n readonly eventNotificationRules: readonly EventNotificationRule[]\n}\n\n/**\n * Request parameters for the `b2_set_bucket_notification_rules` API call.\n * Replaces all existing notification rules on the bucket.\n */\nexport interface SetBucketNotificationRulesRequest {\n /** Bucket to set notification rules on. */\n readonly bucketId: BucketId\n /** Notification rules to apply. Replaces all existing rules. */\n readonly eventNotificationRules: readonly EventNotificationRule[]\n}\n\n/** Response from the `b2_set_bucket_notification_rules` API call. Same shape as the get response. */\nexport type SetBucketNotificationRulesResponse = GetBucketNotificationRulesResponse\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,YAAY;;CAEvB,kBAAkB;;CAElB,qBAAqB;;CAErB,8BAA8B;;CAE9B,mBAAmB;;CAEnB,sBAAsB;;CAEtB,mBAAmB;;CAEnB,kBAAkB;;CAElB,qBAAqB;;CAErB,4BAA4B;AAC9B"}
|
|
@@ -15,7 +15,7 @@ import { BucketId } from './ids.js';
|
|
|
15
15
|
* isSuspended: false,
|
|
16
16
|
* objectNamePrefix: '',
|
|
17
17
|
* suspensionReason: '',
|
|
18
|
-
* targetConfiguration: { targetType: '
|
|
18
|
+
* targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },
|
|
19
19
|
* },
|
|
20
20
|
* ])
|
|
21
21
|
* ```
|
|
@@ -52,6 +52,8 @@ export interface EventNotificationRule {
|
|
|
52
52
|
readonly isEnabled: boolean;
|
|
53
53
|
/** Whether B2 has suspended this rule due to delivery failures. */
|
|
54
54
|
readonly isSuspended: boolean;
|
|
55
|
+
/** Maximum number of events B2 may include in a single webhook request. */
|
|
56
|
+
readonly maxEventsPerBatch?: number;
|
|
55
57
|
/** Unique name identifying this rule within the bucket. */
|
|
56
58
|
readonly name: string;
|
|
57
59
|
/** Only events for objects with this name prefix trigger the rule. Empty string matches all objects. */
|
|
@@ -60,8 +62,8 @@ export interface EventNotificationRule {
|
|
|
60
62
|
readonly suspensionReason: string;
|
|
61
63
|
/** Webhook target configuration. */
|
|
62
64
|
readonly targetConfiguration: {
|
|
63
|
-
/** Target type (
|
|
64
|
-
readonly targetType:
|
|
65
|
+
/** Target type (`'webhook'` for webhook delivery). */
|
|
66
|
+
readonly targetType: 'webhook';
|
|
65
67
|
/** Webhook URL that receives the event notifications. */
|
|
66
68
|
readonly url: string;
|
|
67
69
|
/** Optional HMAC-SHA256 secret used to sign notification payloads for verification. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/types/notifications.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS;IACpB,oDAAoD;;IAEpD,8CAA8C;;IAE9C,6DAA6D;;IAE7D,6DAA6D;;IAE7D,wDAAwD;;IAExD,kDAAkD;;IAElD,oDAAoD;;IAEpD,oEAAoE;;IAEpE,iDAAiD;;CAEzC,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA;AAElE,qGAAqG;AACrG,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IACzC,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wGAAwG;IACxG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACj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D;QAC5D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAChD,CAAA;CACF;AAED,8EAA8E;AAC9E,MAAM,WAAW,iCAAiC;IAChD,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAC5B;AAED,qEAAqE;AACrE,MAAM,WAAW,kCAAkC;IACjD,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClE;AAED,qGAAqG;AACrG,MAAM,MAAM,kCAAkC,GAAG,kCAAkC,CAAA"}
|
|
@@ -15,7 +15,7 @@ import { BucketId } from './ids.js';
|
|
|
15
15
|
* isSuspended: false,
|
|
16
16
|
* objectNamePrefix: '',
|
|
17
17
|
* suspensionReason: '',
|
|
18
|
-
* targetConfiguration: { targetType: '
|
|
18
|
+
* targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },
|
|
19
19
|
* },
|
|
20
20
|
* ])
|
|
21
21
|
* ```
|
|
@@ -52,6 +52,8 @@ export interface EventNotificationRule {
|
|
|
52
52
|
readonly isEnabled: boolean;
|
|
53
53
|
/** Whether B2 has suspended this rule due to delivery failures. */
|
|
54
54
|
readonly isSuspended: boolean;
|
|
55
|
+
/** Maximum number of events B2 may include in a single webhook request. */
|
|
56
|
+
readonly maxEventsPerBatch?: number;
|
|
55
57
|
/** Unique name identifying this rule within the bucket. */
|
|
56
58
|
readonly name: string;
|
|
57
59
|
/** Only events for objects with this name prefix trigger the rule. Empty string matches all objects. */
|
|
@@ -60,8 +62,8 @@ export interface EventNotificationRule {
|
|
|
60
62
|
readonly suspensionReason: string;
|
|
61
63
|
/** Webhook target configuration. */
|
|
62
64
|
readonly targetConfiguration: {
|
|
63
|
-
/** Target type (
|
|
64
|
-
readonly targetType:
|
|
65
|
+
/** Target type (`'webhook'` for webhook delivery). */
|
|
66
|
+
readonly targetType: 'webhook';
|
|
65
67
|
/** Webhook URL that receives the event notifications. */
|
|
66
68
|
readonly url: string;
|
|
67
69
|
/** Optional HMAC-SHA256 secret used to sign notification payloads for verification. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/types/notifications.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS;IACpB,oDAAoD;;IAEpD,8CAA8C;;IAE9C,6DAA6D;;IAE7D,6DAA6D;;IAE7D,wDAAwD;;IAExD,kDAAkD;;IAElD,oDAAoD;;IAEpD,oEAAoE;;IAEpE,iDAAiD;;CAEzC,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA;AAElE,qGAAqG;AACrG,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IACzC,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wGAAwG;IACxG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,oCAAoC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QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAChD,CAAA;CACF;AAED,8EAA8E;AAC9E,MAAM,WAAW,iCAAiC;IAChD,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAC5B;AAED,qEAAqE;AACrE,MAAM,WAAW,kCAAkC;IACjD,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClE;AAED,qGAAqG;AACrG,MAAM,MAAM,kCAAkC,GAAG,kCAAkC,CAAA"}
|
|
@@ -1,24 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
//#region src/types/notifications.ts
|
|
2
|
+
/**
|
|
3
|
+
* Named constants for the B2 event types that can trigger notifications.
|
|
4
|
+
*
|
|
5
|
+
* Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to
|
|
6
|
+
* every sub-event in their category.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* await bucket.setNotificationRules([
|
|
11
|
+
* {
|
|
12
|
+
* name: 'all-uploads',
|
|
13
|
+
* eventTypes: [EventType.ObjectCreatedAll],
|
|
14
|
+
* isEnabled: true,
|
|
15
|
+
* isSuspended: false,
|
|
16
|
+
* objectNamePrefix: '',
|
|
17
|
+
* suspensionReason: '',
|
|
18
|
+
* targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },
|
|
19
|
+
* },
|
|
20
|
+
* ])
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
var EventType = {
|
|
24
|
+
/** Wildcard: any `b2:ObjectCreated:*` sub-event. */
|
|
25
|
+
ObjectCreatedAll: "b2:ObjectCreated:*",
|
|
26
|
+
/** A small-file upload (`b2_upload_file`). */
|
|
27
|
+
ObjectCreatedUpload: "b2:ObjectCreated:Upload",
|
|
28
|
+
/** A multipart upload completed (`b2_finish_large_file`). */
|
|
29
|
+
ObjectCreatedMultipartUpload: "b2:ObjectCreated:MultipartUpload",
|
|
30
|
+
/** A server-side copy (`b2_copy_file` or `b2_copy_part`). */
|
|
31
|
+
ObjectCreatedCopy: "b2:ObjectCreated:Copy",
|
|
32
|
+
/** A replica delivered via cross-region replication. */
|
|
33
|
+
ObjectCreatedReplica: "b2:ObjectCreated:Replica",
|
|
34
|
+
/** A hide marker was created (`b2_hide_file`). */
|
|
35
|
+
ObjectCreatedHide: "b2:ObjectCreated:Hide",
|
|
36
|
+
/** Wildcard: any `b2:ObjectDeleted:*` sub-event. */
|
|
37
|
+
ObjectDeletedAll: "b2:ObjectDeleted:*",
|
|
38
|
+
/** A version was permanently deleted (`b2_delete_file_version`). */
|
|
39
|
+
ObjectDeletedDelete: "b2:ObjectDeleted:Delete",
|
|
40
|
+
/** A version was removed by a lifecycle rule. */
|
|
41
|
+
ObjectDeletedLifecycleRule: "b2:ObjectDeleted:LifecycleRule"
|
|
20
42
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=notifications.js.map
|
|
43
|
+
//#endregion
|
|
44
|
+
export { EventType };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sources":["../../src/types/notifications.ts"],"sourcesContent":["import type { BucketId } from './ids.ts'\n\n/**\n * Named constants for the B2 event types that can trigger notifications.\n *\n * Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to\n * every sub-event in their category.\n *\n * @example\n * ```ts\n * await bucket.setNotificationRules([\n * {\n * name: 'all-uploads',\n * eventTypes: [EventType.ObjectCreatedAll],\n * isEnabled: true,\n * isSuspended: false,\n * objectNamePrefix: '',\n * suspensionReason: '',\n * targetConfiguration: { targetType: '
|
|
1
|
+
{"version":3,"file":"notifications.js","names":[],"sources":["../../src/types/notifications.ts"],"sourcesContent":["import type { BucketId } from './ids.ts'\n\n/**\n * Named constants for the B2 event types that can trigger notifications.\n *\n * Wildcard variants (`ObjectCreatedAll`, `ObjectDeletedAll`) subscribe to\n * every sub-event in their category.\n *\n * @example\n * ```ts\n * await bucket.setNotificationRules([\n * {\n * name: 'all-uploads',\n * eventTypes: [EventType.ObjectCreatedAll],\n * isEnabled: true,\n * isSuspended: false,\n * objectNamePrefix: '',\n * suspensionReason: '',\n * targetConfiguration: { targetType: 'webhook', url: 'https://example.com/webhook' },\n * },\n * ])\n * ```\n */\nexport const EventType = {\n /** Wildcard: any `b2:ObjectCreated:*` sub-event. */\n ObjectCreatedAll: 'b2:ObjectCreated:*',\n /** A small-file upload (`b2_upload_file`). */\n ObjectCreatedUpload: 'b2:ObjectCreated:Upload',\n /** A multipart upload completed (`b2_finish_large_file`). */\n ObjectCreatedMultipartUpload: 'b2:ObjectCreated:MultipartUpload',\n /** A server-side copy (`b2_copy_file` or `b2_copy_part`). */\n ObjectCreatedCopy: 'b2:ObjectCreated:Copy',\n /** A replica delivered via cross-region replication. */\n ObjectCreatedReplica: 'b2:ObjectCreated:Replica',\n /** A hide marker was created (`b2_hide_file`). */\n ObjectCreatedHide: 'b2:ObjectCreated:Hide',\n /** Wildcard: any `b2:ObjectDeleted:*` sub-event. */\n ObjectDeletedAll: 'b2:ObjectDeleted:*',\n /** A version was permanently deleted (`b2_delete_file_version`). */\n ObjectDeletedDelete: 'b2:ObjectDeleted:Delete',\n /** A version was removed by a lifecycle rule. */\n ObjectDeletedLifecycleRule: 'b2:ObjectDeleted:LifecycleRule',\n} as const\n\n/**\n * B2 event types that can trigger notifications. Derived from {@link EventType}.\n */\nexport type EventType = (typeof EventType)[keyof typeof EventType]\n\n/** A rule that defines which bucket events trigger webhook notifications and where they are sent. */\nexport interface EventNotificationRule {\n /** Event types that trigger this notification rule. */\n readonly eventTypes: readonly EventType[]\n /** Whether this rule is actively sending notifications. */\n readonly isEnabled: boolean\n /** Whether B2 has suspended this rule due to delivery failures. */\n readonly isSuspended: boolean\n /** Maximum number of events B2 may include in a single webhook request. */\n readonly maxEventsPerBatch?: number\n /** Unique name identifying this rule within the bucket. */\n readonly name: string\n /** Only events for objects with this name prefix trigger the rule. Empty string matches all objects. */\n readonly objectNamePrefix: string\n /** Reason for suspension, or empty string if not suspended. */\n readonly suspensionReason: string\n /** Webhook target configuration. */\n readonly targetConfiguration: {\n /** Target type (`'webhook'` for webhook delivery). */\n readonly targetType: 'webhook'\n /** Webhook URL that receives the event notifications. */\n readonly url: string\n /** Optional HMAC-SHA256 secret used to sign notification payloads for verification. */\n readonly hmacSha256SigningSecret?: string\n /** Optional custom headers included in webhook requests. */\n readonly customHeaders?: Record<string, string>\n }\n}\n\n/** Request parameters for the `b2_get_bucket_notification_rules` API call. */\nexport interface GetBucketNotificationRulesRequest {\n /** Bucket to get notification rules for. */\n readonly bucketId: BucketId\n}\n\n/** Response from the `b2_get_bucket_notification_rules` API call. */\nexport interface GetBucketNotificationRulesResponse {\n /** Bucket these rules belong to. */\n readonly bucketId: BucketId\n /** Array of event notification rules configured on the bucket. */\n readonly eventNotificationRules: readonly EventNotificationRule[]\n}\n\n/**\n * Request parameters for the `b2_set_bucket_notification_rules` API call.\n * Replaces all existing notification rules on the bucket.\n */\nexport interface SetBucketNotificationRulesRequest {\n /** Bucket to set notification rules on. */\n readonly bucketId: BucketId\n /** Notification rules to apply. Replaces all existing rules. */\n readonly eventNotificationRules: readonly EventNotificationRule[]\n}\n\n/** Response from the `b2_set_bucket_notification_rules` API call. Same shape as the get response. */\nexport type SetBucketNotificationRulesResponse = GetBucketNotificationRulesResponse\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,YAAY;;CAEvB,kBAAkB;;CAElB,qBAAqB;;CAErB,8BAA8B;;CAE9B,mBAAmB;;CAEnB,sBAAsB;;CAEtB,mBAAmB;;CAEnB,kBAAkB;;CAElB,qBAAqB;;CAErB,4BAA4B;AAC9B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_ids = require("./ids.cjs");
|
|
2
|
+
//#region src/types/partner.ts
|
|
3
|
+
/**
|
|
4
|
+
* Named constants for Partner API and Computer Backup API capabilities.
|
|
5
|
+
*
|
|
6
|
+
* Partner grant sets are separate from the storage-facing capability set. The
|
|
7
|
+
* Partner and Backup authorization surfaces currently document the full-access
|
|
8
|
+
* grant as `all`.
|
|
9
|
+
*/
|
|
10
|
+
var PartnerCapability = {
|
|
11
|
+
/** Full Partner API or Computer Backup API access for the authorized key. */
|
|
12
|
+
All: "all" };
|
|
13
|
+
/**
|
|
14
|
+
* Named constants for Backblaze regions accepted by Partner API account-creation endpoints.
|
|
15
|
+
*/
|
|
16
|
+
var Region = {
|
|
17
|
+
/** US East region. */
|
|
18
|
+
UsEast: "us-east",
|
|
19
|
+
/** US West region. */
|
|
20
|
+
UsWest: "us-west",
|
|
21
|
+
/** Canada East region. */
|
|
22
|
+
CaEast: "ca-east",
|
|
23
|
+
/** EU Central region. */
|
|
24
|
+
EuCentral: "eu-central"
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.PartnerCapability = PartnerCapability;
|
|
28
|
+
exports.Region = Region;
|
|
29
|
+
exports.computerId = require_ids.computerId;
|
|
30
|
+
exports.groupId = require_ids.groupId;
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=partner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partner.cjs","names":[],"sources":["../../src/types/partner.ts"],"sourcesContent":["import type { Capability } from './auth.ts'\nimport type { AccountId, ApplicationKeyId, BucketId, GroupId, PartnerToken } from './ids.ts'\n\nexport type { ComputerId, GroupId, PartnerToken } from './ids.ts'\nexport { computerId, groupId, partnerToken } from './ids.ts'\n\n/**\n * Named constants for Partner API and Computer Backup API capabilities.\n *\n * Partner grant sets are separate from the storage-facing capability set. The\n * Partner and Backup authorization surfaces currently document the full-access\n * grant as `all`.\n */\nexport const PartnerCapability = {\n /** Full Partner API or Computer Backup API access for the authorized key. */\n All: 'all',\n} as const\n\n/** Partner API or Computer Backup API capability derived from {@link PartnerCapability}. */\nexport type PartnerCapability = (typeof PartnerCapability)[keyof typeof PartnerCapability]\n\n/**\n * Named constants for Backblaze regions accepted by Partner API account-creation endpoints.\n */\nexport const Region = {\n /** US East region. */\n UsEast: 'us-east',\n /** US West region. */\n UsWest: 'us-west',\n /** Canada East region. */\n CaEast: 'ca-east',\n /** EU Central region. */\n EuCentral: 'eu-central',\n} as const\n\n/** Backblaze region identifier derived from {@link Region}. */\nexport type Region = (typeof Region)[keyof typeof Region]\n\n/** Partner API endpoint information returned by `b2_authorize_account`. */\nexport interface PartnerGroupsApiInfo {\n /** Capabilities granted for Partner API calls, currently documented as `['all']`. */\n readonly capabilities: readonly PartnerCapability[]\n /** Base URL for Partner API calls. */\n readonly groupsApiUrl: string\n /** Discriminator indicating this is Partner API information. */\n readonly infoType: 'groupsApi'\n}\n\n/** Computer Backup API endpoint information returned by `b2_authorize_account`. */\nexport interface PartnerBackupApiInfo {\n /** Capabilities granted for Computer Backup API calls, currently documented as `['all']`. */\n readonly capabilities: readonly PartnerCapability[]\n /** Base URL for Computer Backup API calls. */\n readonly backupApiUrl: string\n /** Discriminator indicating this is Computer Backup API information. */\n readonly infoType: 'backupApi'\n}\n\n/** Storage API endpoint information returned alongside Partner authorization details. */\nexport interface PartnerStorageApiInfo {\n /** Minimum allowed part size for large file uploads, in bytes. */\n readonly absoluteMinimumPartSize: number\n /** Base URL for B2 Native API calls. */\n readonly apiUrl: string\n /** Bucket ID this key is restricted to, or null if unrestricted. */\n readonly bucketId: BucketId | null\n /** Bucket name this key is restricted to, or null if unrestricted or unavailable. */\n readonly bucketName: string | null\n /** Storage API capabilities granted to this key. */\n readonly capabilities: readonly Capability[]\n /** Base URL for file downloads. */\n readonly downloadUrl: string\n /** Discriminator indicating this is storage API information. */\n readonly infoType: 'storageApi'\n /** File name prefix this key is restricted to, or null if unrestricted. */\n readonly namePrefix: string | null\n /** Recommended part size for large file uploads, in bytes. */\n readonly recommendedPartSize: number\n /** Base URL for the S3-compatible API. */\n readonly s3ApiUrl: string\n}\n\n/**\n * API-specific information needed by Partner and Computer Backup API clients.\n * At least one of `groupsApi` or `backupApi` is present in a normalized\n * Partner authorization response. Suite URLs and capabilities in this object\n * are the authoritative values; flattened fields on\n * {@link PartnerAuthorizeResponse} are convenience mirrors.\n */\nexport interface PartnerApiInfo {\n /** B2 Native API configuration returned with Partner authorization details when storage is enabled. */\n readonly storageApi?: PartnerStorageApiInfo\n /** Partner API configuration, present when the authorized account has Partner API access. */\n readonly groupsApi?: PartnerGroupsApiInfo\n /** Computer Backup API configuration, present when the authorized account has Backup API access. */\n readonly backupApi?: PartnerBackupApiInfo\n}\n\n/** Response from Partner-oriented `b2_authorize_account`. */\nexport interface PartnerAuthorizeResponse {\n /** Account ID for the authorized partner administrator. */\n readonly accountId: AccountId\n /** Authorization token to use for Partner API and Computer Backup API requests. Do not log this secret value. */\n readonly authorizationToken: PartnerToken\n /** Suite-shaped API information returned by `b2_authorize_account`; authoritative for suite URLs and capabilities. */\n readonly apiInfo: PartnerApiInfo\n /** Convenience mirror of `apiInfo.groupsApi.groupsApiUrl` when the Partner suite is enabled. */\n readonly groupsApiUrl?: string\n /** Convenience mirror of `apiInfo.backupApi.backupApiUrl` when the Backup suite is enabled. */\n readonly backupApiUrl?: string\n /** Convenience mirror of `apiInfo.groupsApi.capabilities` when the Partner suite is enabled. */\n readonly groupsCapabilities?: readonly PartnerCapability[]\n /** Convenience mirror of `apiInfo.backupApi.capabilities` when the Backup suite is enabled. */\n readonly backupCapabilities?: readonly PartnerCapability[]\n /** Expiration timestamp of the application key in milliseconds, or null if the key does not expire. */\n readonly applicationKeyExpirationTimestamp: number | null\n}\n\n/**\n * Request parameters for `b2_create_group_member`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface CreateGroupMemberRequest {\n /** Account ID of the group administrator authorized for the Partner API. */\n readonly adminAccountId: AccountId\n /** Group ID that the new Backblaze account will join. */\n readonly groupId: GroupId\n /** Email address for the new group member account. */\n readonly memberEmail: string\n /** Region for the new account's data, or null to use the current default region. */\n readonly region?: Region | null\n}\n\n/**\n * Group member fields returned by Partner API membership operations.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface PartnerGroupMember {\n /** Account ID for the group member. Group member account IDs reuse the SDK's existing AccountId brand. */\n readonly accountId: AccountId\n /** Email address of the group member account. */\n readonly email: string\n /** Group ID that contains the member. */\n readonly groupId: GroupId\n /** Name of the group that contains the member. */\n readonly groupName: string\n /** Region where the group member account's data resides. */\n readonly region: Region\n /** S3-compatible endpoint domain for the group member account. */\n readonly s3Endpoint: string\n}\n\n/**\n * Single result element returned by `b2_create_group_member`.\n *\n * The `b2_create_group_member` wire response is a JSON array of these objects.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface CreateGroupMemberResult {\n /** Application key ID for the new group member account. */\n readonly applicationKeyId: ApplicationKeyId\n /** Application key secret for the new group member account. Do not log this secret value. */\n readonly applicationKey: string\n /** Newly created group member account details. */\n readonly groupMember: PartnerGroupMember\n}\n\n/**\n * Array-shaped wire response from `b2_create_group_member`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type CreateGroupMemberResponse = readonly CreateGroupMemberResult[]\n\n/**\n * Request parameters for `b2_eject_group_member`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface EjectGroupMemberRequest {\n /** Account ID of the group administrator authorized for the Partner API. */\n readonly adminAccountId: AccountId\n /** Group ID that currently contains the member. */\n readonly groupId: GroupId\n /** Account ID of the group member being ejected. */\n readonly memberAccountId: AccountId\n /** Replacement email for the ejected account, or null to keep the current email address. */\n readonly email?: string | null\n}\n\n/**\n * Single result element returned by `b2_eject_group_member`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type EjectGroupMemberResult = PartnerGroupMember\n\n/**\n * Single-object wire response from `b2_eject_group_member`.\n *\n * B2 returns one ejected-member object (not an array), unlike\n * `b2_create_group_member` which returns an array.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type EjectGroupMemberResponse = EjectGroupMemberResult\n\n/**\n * Request parameters for `b2_list_groups`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ListGroupsRequest {\n /** Account ID of the group administrator authorized for the Partner API. */\n readonly adminAccountId: AccountId\n /** Optional group name filter. Multiple groups may share the same name. */\n readonly groupName?: string\n /** Group ID to start listing from for pagination. */\n readonly startGroupId?: GroupId\n /** Maximum number of groups to return. The documented range is 1 through 100. */\n readonly maxGroupCount?: number\n}\n\n/**\n * B2 storage statistics returned for partner groups and group members.\n *\n * The Partner API currently returns count fields as JSON strings even though\n * they are numeric-looking values. The SDK preserves those decimal strings\n * instead of normalizing them to numbers.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface PartnerB2Stats {\n /** Total bytes stored as a decimal string. */\n readonly b2BytesStoredCount: string\n /** Total files stored as a decimal string. */\n readonly b2FilesStoredCount: string\n /** ISO 8601 UTC date-time string for the daily B2 statistics snapshot, or null if unavailable. */\n readonly b2StatsAsOfTimestamp: string | null\n /** Total bucket count as a decimal string. */\n readonly bucketCount: string\n}\n\n/**\n * Account standing information for a partner group.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface PartnerAccountStandingDetails {\n /** Account standing state reported by the Partner API. */\n readonly state: string\n}\n\n/**\n * Daily group statistics returned by `b2_list_groups`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface PartnerGroupStats {\n /** ISO 8601 UTC date-time string for when the group was created. */\n readonly createdTimestamp: string\n /** ISO 8601 UTC date-time string for the last update to the group's statistics. */\n readonly groupStatsAsOfTimestamp: string\n /** Total number of accepted members in the group. */\n readonly memberCount: number\n}\n\n/**\n * Group record returned by `b2_list_groups`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface PartnerGroup {\n /** Account standing information for the group. */\n readonly accountStandingDetails: PartnerAccountStandingDetails\n /** B2 storage statistics for the group. Count fields are preserved as decimal strings. */\n readonly b2Stats: PartnerB2Stats\n /** Unique ID of the group. */\n readonly groupId: GroupId\n /** Human-readable group name. */\n readonly groupName: string\n /** Products enabled for the group, such as `BACKUP` or `STORAGE`. */\n readonly groupProducts: readonly string[]\n /** Daily aggregate statistics for the group. */\n readonly groupStats: PartnerGroupStats\n}\n\n/**\n * Single result element returned by `b2_list_groups`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ListGroupsResult {\n /** Account ID for the group administrator whose groups were listed. */\n readonly accountId: AccountId\n /** Groups matching the request. */\n readonly groups: readonly PartnerGroup[]\n /** Next group ID to use for pagination, or null if all groups have been listed. */\n readonly nextGroupId: GroupId | null\n}\n\n/**\n * Single-object wire response from `b2_list_groups`.\n *\n * B2 returns one object with `accountId`, `groups`, and the `nextGroupId`\n * cursor (not an array), unlike `b2_list_group_members` which returns an array.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type ListGroupsResponse = ListGroupsResult\n\n/**\n * Request parameters for `b2_list_group_members`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ListGroupMembersRequest {\n /** Account ID of the group administrator authorized for the Partner API. */\n readonly adminAccountId: AccountId\n /** Group ID whose active members should be listed. */\n readonly groupId: GroupId\n /** First member email address to return for pagination. */\n readonly startEmail?: string\n /** Maximum number of group members to return. The documented maximum is 1000. */\n readonly maxMemberCount?: number\n}\n\n/**\n * Group member record returned by `b2_list_group_members`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ListedGroupMember extends PartnerGroupMember {\n /** B2 storage statistics for the member. Count fields are preserved as decimal strings. */\n readonly b2Stats: PartnerB2Stats\n}\n\n/**\n * Single result element returned by `b2_list_group_members`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ListGroupMembersResult {\n /** Group ID whose members were listed. */\n readonly groupId: GroupId\n /** Human-readable group name. */\n readonly groupName: string\n /** Next email address to use for pagination, or null if all members have been listed. */\n readonly nextEmail: string | null\n /** Active accepted group members matching the request. */\n readonly groupMembers: readonly ListedGroupMember[]\n}\n\n/**\n * Array-shaped wire response from `b2_list_group_members`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type ListGroupMembersResponse = readonly ListGroupMembersResult[]\n\n/**\n * Single request element accepted by `b2_reserve_trial_create_account`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ReserveTrialCreateAccountRequestEntry {\n /** Email address for the new B2 reserve trial account. */\n readonly email: string\n /** Region for the new account's data, or null to let Backblaze choose. */\n readonly region?: Region | null\n /** Trial duration in days. The documented range is 7 through 30. */\n readonly term: number\n /** Trial storage amount in TB. The documented range is 1 through 50. */\n readonly storage: number\n}\n\n/**\n * Array-shaped wire request body for `b2_reserve_trial_create_account`.\n * The Partner API requires at least one request entry per call.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type ReserveTrialCreateAccountRequest = readonly [\n ReserveTrialCreateAccountRequestEntry,\n ...ReserveTrialCreateAccountRequestEntry[],\n]\n\n/**\n * Single result element returned by `b2_reserve_trial_create_account`.\n *\n * The `b2_reserve_trial_create_account` wire response is a JSON array of\n * these objects.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport interface ReserveTrialCreateAccountResult {\n /** Account ID of the newly created B2 reserve trial account. */\n readonly accountId: AccountId\n /** Application key secret for the new account. Do not log this secret value. */\n readonly applicationKey: string\n /** Application key ID for the new account. */\n readonly applicationKeyId: ApplicationKeyId\n /** S3-compatible endpoint domain for the new account. */\n readonly s3Endpoint: string\n /** Trial start date in ISO 8601 `yyyy-MM-dd` format in UTC. */\n readonly startDate: string\n /** Trial end date in ISO 8601 `yyyy-MM-dd` format in UTC. */\n readonly endDate: string\n /** Email address for the new B2 reserve trial account. */\n readonly email: string\n /** Bucket name accessible with the returned application key. */\n readonly bucketName: string\n /** Bucket ID accessible with the returned application key. */\n readonly bucketId: BucketId\n}\n\n/**\n * Array-shaped wire response from `b2_reserve_trial_create_account`.\n *\n * @experimental Partner API surface; shape may change as the Partner API docs evolve.\n */\nexport type ReserveTrialCreateAccountResponse = readonly ReserveTrialCreateAccountResult[]\n"],"mappings":";;;;;;;;;AAaA,IAAa,oBAAoB;;AAE/B,KAAK,MACP;;;;AAQA,IAAa,SAAS;;CAEpB,QAAQ;;CAER,QAAQ;;CAER,QAAQ;;CAER,WAAW;AACb"}
|