@backblaze-labs/b2-sdk 0.2.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.
Files changed (460) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/README.md +20 -2
  3. package/dist/_virtual/_b2-sdk-version-json.cjs +1 -1
  4. package/dist/_virtual/_b2-sdk-version-json.js +1 -1
  5. package/dist/auth/file.cjs.map +1 -1
  6. package/dist/backup/client.cjs +206 -0
  7. package/dist/backup/client.cjs.map +1 -0
  8. package/dist/backup/client.d.cts +238 -0
  9. package/dist/backup/client.d.cts.map +1 -0
  10. package/dist/backup/client.d.ts +238 -0
  11. package/dist/backup/client.d.ts.map +1 -0
  12. package/dist/backup/client.js +206 -0
  13. package/dist/backup/client.js.map +1 -0
  14. package/dist/backup/index.cjs +15 -0
  15. package/dist/backup/index.d.cts +22 -0
  16. package/dist/backup/index.d.cts.map +1 -0
  17. package/dist/backup/index.d.ts +22 -0
  18. package/dist/backup/index.d.ts.map +1 -0
  19. package/dist/backup/index.js +7 -0
  20. package/dist/backup/raw.cjs +146 -0
  21. package/dist/backup/raw.cjs.map +1 -0
  22. package/dist/backup/raw.d.cts +122 -0
  23. package/dist/backup/raw.d.cts.map +1 -0
  24. package/dist/backup/raw.d.ts +122 -0
  25. package/dist/backup/raw.d.ts.map +1 -0
  26. package/dist/backup/raw.js +146 -0
  27. package/dist/backup/raw.js.map +1 -0
  28. package/dist/bucket.cjs +2 -1
  29. package/dist/bucket.cjs.map +1 -1
  30. package/dist/bucket.js +2 -1
  31. package/dist/bucket.js.map +1 -1
  32. package/dist/copy/large.cjs +5 -3
  33. package/dist/copy/large.cjs.map +1 -1
  34. package/dist/copy/large.d.cts.map +1 -1
  35. package/dist/copy/large.d.ts.map +1 -1
  36. package/dist/copy/large.js +5 -3
  37. package/dist/copy/large.js.map +1 -1
  38. package/dist/download/checksum.cjs +6 -2
  39. package/dist/download/checksum.cjs.map +1 -1
  40. package/dist/download/checksum.js +6 -2
  41. package/dist/download/checksum.js.map +1 -1
  42. package/dist/download/parallel.cjs +52 -15
  43. package/dist/download/parallel.cjs.map +1 -1
  44. package/dist/download/parallel.d.cts +8 -1
  45. package/dist/download/parallel.d.cts.map +1 -1
  46. package/dist/download/parallel.d.ts +8 -1
  47. package/dist/download/parallel.d.ts.map +1 -1
  48. package/dist/download/parallel.js +52 -15
  49. package/dist/download/parallel.js.map +1 -1
  50. package/dist/download/single.cjs +141 -6
  51. package/dist/download/single.cjs.map +1 -1
  52. package/dist/download/single.d.cts.map +1 -1
  53. package/dist/download/single.d.ts.map +1 -1
  54. package/dist/download/single.js +141 -6
  55. package/dist/download/single.js.map +1 -1
  56. package/dist/errors/index.cjs +173 -3
  57. package/dist/errors/index.cjs.map +1 -1
  58. package/dist/errors/index.d.cts +119 -0
  59. package/dist/errors/index.d.cts.map +1 -1
  60. package/dist/errors/index.d.ts +119 -0
  61. package/dist/errors/index.d.ts.map +1 -1
  62. package/dist/errors/index.js +161 -4
  63. package/dist/errors/index.js.map +1 -1
  64. package/dist/http/retry.cjs +1 -1
  65. package/dist/http/retry.cjs.map +1 -1
  66. package/dist/http/retry.js +1 -1
  67. package/dist/http/retry.js.map +1 -1
  68. package/dist/http/transport.cjs +61 -23
  69. package/dist/http/transport.cjs.map +1 -1
  70. package/dist/http/transport.d.cts +25 -3
  71. package/dist/http/transport.d.cts.map +1 -1
  72. package/dist/http/transport.d.ts +25 -3
  73. package/dist/http/transport.d.ts.map +1 -1
  74. package/dist/http/transport.js +59 -22
  75. package/dist/http/transport.js.map +1 -1
  76. package/dist/index.cjs +25 -2
  77. package/dist/index.d.cts +6 -4
  78. package/dist/index.d.cts.map +1 -1
  79. package/dist/index.d.ts +6 -4
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +8 -6
  82. package/dist/object.cjs +1 -1
  83. package/dist/object.cjs.map +1 -1
  84. package/dist/object.d.cts +4 -2
  85. package/dist/object.d.cts.map +1 -1
  86. package/dist/object.d.ts +4 -2
  87. package/dist/object.d.ts.map +1 -1
  88. package/dist/object.js +1 -1
  89. package/dist/object.js.map +1 -1
  90. package/dist/partner/account-info.d.cts +43 -0
  91. package/dist/partner/account-info.d.cts.map +1 -0
  92. package/dist/partner/account-info.d.ts +43 -0
  93. package/dist/partner/account-info.d.ts.map +1 -0
  94. package/dist/partner/auth-clone.cjs +64 -0
  95. package/dist/partner/auth-clone.cjs.map +1 -0
  96. package/dist/partner/auth-clone.d.cts +27 -0
  97. package/dist/partner/auth-clone.d.cts.map +1 -0
  98. package/dist/partner/auth-clone.d.ts +27 -0
  99. package/dist/partner/auth-clone.d.ts.map +1 -0
  100. package/dist/partner/auth-clone.js +63 -0
  101. package/dist/partner/auth-clone.js.map +1 -0
  102. package/dist/partner/auth-core.cjs +175 -0
  103. package/dist/partner/auth-core.cjs.map +1 -0
  104. package/dist/partner/auth-core.d.cts +111 -0
  105. package/dist/partner/auth-core.d.cts.map +1 -0
  106. package/dist/partner/auth-core.d.ts +111 -0
  107. package/dist/partner/auth-core.d.ts.map +1 -0
  108. package/dist/partner/auth-core.js +175 -0
  109. package/dist/partner/auth-core.js.map +1 -0
  110. package/dist/partner/auth-shape.cjs +36 -0
  111. package/dist/partner/auth-shape.cjs.map +1 -0
  112. package/dist/partner/auth-shape.d.cts +12 -0
  113. package/dist/partner/auth-shape.d.cts.map +1 -0
  114. package/dist/partner/auth-shape.d.ts +12 -0
  115. package/dist/partner/auth-shape.d.ts.map +1 -0
  116. package/dist/partner/auth-shape.js +36 -0
  117. package/dist/partner/auth-shape.js.map +1 -0
  118. package/dist/partner/client.cjs +255 -0
  119. package/dist/partner/client.cjs.map +1 -0
  120. package/dist/partner/client.d.cts +335 -0
  121. package/dist/partner/client.d.cts.map +1 -0
  122. package/dist/partner/client.d.ts +335 -0
  123. package/dist/partner/client.d.ts.map +1 -0
  124. package/dist/partner/client.js +255 -0
  125. package/dist/partner/client.js.map +1 -0
  126. package/dist/partner/endpoint-url.cjs +108 -0
  127. package/dist/partner/endpoint-url.cjs.map +1 -0
  128. package/dist/partner/endpoint-url.d.cts +72 -0
  129. package/dist/partner/endpoint-url.d.cts.map +1 -0
  130. package/dist/partner/endpoint-url.d.ts +72 -0
  131. package/dist/partner/endpoint-url.d.ts.map +1 -0
  132. package/dist/partner/endpoint-url.js +105 -0
  133. package/dist/partner/endpoint-url.js.map +1 -0
  134. package/dist/partner/in-memory.cjs +135 -0
  135. package/dist/partner/in-memory.cjs.map +1 -0
  136. package/dist/partner/in-memory.d.cts +99 -0
  137. package/dist/partner/in-memory.d.cts.map +1 -0
  138. package/dist/partner/in-memory.d.ts +99 -0
  139. package/dist/partner/in-memory.d.ts.map +1 -0
  140. package/dist/partner/in-memory.js +135 -0
  141. package/dist/partner/in-memory.js.map +1 -0
  142. package/dist/partner/index.cjs +18 -0
  143. package/dist/partner/index.d.cts +23 -0
  144. package/dist/partner/index.d.cts.map +1 -0
  145. package/dist/partner/index.d.ts +23 -0
  146. package/dist/partner/index.d.ts.map +1 -0
  147. package/dist/partner/index.js +7 -0
  148. package/dist/partner/raw.cjs +392 -0
  149. package/dist/partner/raw.cjs.map +1 -0
  150. package/dist/partner/raw.d.cts +223 -0
  151. package/dist/partner/raw.d.cts.map +1 -0
  152. package/dist/partner/raw.d.ts +223 -0
  153. package/dist/partner/raw.d.ts.map +1 -0
  154. package/dist/partner/raw.js +390 -0
  155. package/dist/partner/raw.js.map +1 -0
  156. package/dist/partner/redaction-placeholders.cjs +10 -0
  157. package/dist/partner/redaction-placeholders.cjs.map +1 -0
  158. package/dist/partner/redaction-placeholders.d.cts +5 -0
  159. package/dist/partner/redaction-placeholders.d.cts.map +1 -0
  160. package/dist/partner/redaction-placeholders.d.ts +5 -0
  161. package/dist/partner/redaction-placeholders.d.ts.map +1 -0
  162. package/dist/partner/redaction-placeholders.js +9 -0
  163. package/dist/partner/redaction-placeholders.js.map +1 -0
  164. package/dist/partner/redaction.cjs +267 -0
  165. package/dist/partner/redaction.cjs.map +1 -0
  166. package/dist/partner/redaction.d.cts +124 -0
  167. package/dist/partner/redaction.d.cts.map +1 -0
  168. package/dist/partner/redaction.d.ts +124 -0
  169. package/dist/partner/redaction.d.ts.map +1 -0
  170. package/dist/partner/redaction.js +257 -0
  171. package/dist/partner/redaction.js.map +1 -0
  172. package/dist/raw/index.cjs +81 -19
  173. package/dist/raw/index.cjs.map +1 -1
  174. package/dist/raw/index.d.cts +6 -2
  175. package/dist/raw/index.d.cts.map +1 -1
  176. package/dist/raw/index.d.ts +6 -2
  177. package/dist/raw/index.d.ts.map +1 -1
  178. package/dist/raw/index.js +81 -19
  179. package/dist/raw/index.js.map +1 -1
  180. package/dist/raw/url.cjs +111 -0
  181. package/dist/raw/url.cjs.map +1 -0
  182. package/dist/raw/url.d.cts +41 -0
  183. package/dist/raw/url.d.cts.map +1 -0
  184. package/dist/raw/url.d.ts +41 -0
  185. package/dist/raw/url.d.ts.map +1 -0
  186. package/dist/raw/url.js +110 -0
  187. package/dist/raw/url.js.map +1 -0
  188. package/dist/s3/sigv4.cjs +15 -10
  189. package/dist/s3/sigv4.cjs.map +1 -1
  190. package/dist/s3/sigv4.js +15 -10
  191. package/dist/s3/sigv4.js.map +1 -1
  192. package/dist/simulator/index.cjs +1197 -206
  193. package/dist/simulator/index.cjs.map +1 -1
  194. package/dist/simulator/index.d.cts +109 -11
  195. package/dist/simulator/index.d.cts.map +1 -1
  196. package/dist/simulator/index.d.ts +109 -11
  197. package/dist/simulator/index.d.ts.map +1 -1
  198. package/dist/simulator/index.js +1196 -209
  199. package/dist/simulator/index.js.map +1 -1
  200. package/dist/simulator/partner.cjs +719 -0
  201. package/dist/simulator/partner.cjs.map +1 -0
  202. package/dist/simulator/partner.d.cts +183 -0
  203. package/dist/simulator/partner.d.cts.map +1 -0
  204. package/dist/simulator/partner.d.ts +183 -0
  205. package/dist/simulator/partner.d.ts.map +1 -0
  206. package/dist/simulator/partner.js +718 -0
  207. package/dist/simulator/partner.js.map +1 -0
  208. package/dist/simulator/validation.cjs +577 -0
  209. package/dist/simulator/validation.cjs.map +1 -1
  210. package/dist/simulator/validation.d.cts +117 -0
  211. package/dist/simulator/validation.d.cts.map +1 -1
  212. package/dist/simulator/validation.d.ts +117 -0
  213. package/dist/simulator/validation.d.ts.map +1 -1
  214. package/dist/simulator/validation.js +563 -1
  215. package/dist/simulator/validation.js.map +1 -1
  216. package/dist/streams/file-source.cjs +1 -1
  217. package/dist/streams/file-source.cjs.map +1 -1
  218. package/dist/streams/file-source.js +1 -1
  219. package/dist/streams/file-source.js.map +1 -1
  220. package/dist/streams/index.cjs +1 -1
  221. package/dist/streams/index.js +1 -1
  222. package/dist/streams/source.cjs +2 -1
  223. package/dist/streams/source.cjs.map +1 -1
  224. package/dist/streams/source.js +2 -1
  225. package/dist/streams/source.js.map +1 -1
  226. package/dist/sync/b2-sha1-reader.cjs +6 -2
  227. package/dist/sync/b2-sha1-reader.cjs.map +1 -1
  228. package/dist/sync/b2-sha1-reader.d.cts.map +1 -1
  229. package/dist/sync/b2-sha1-reader.d.ts.map +1 -1
  230. package/dist/sync/b2-sha1-reader.js +6 -2
  231. package/dist/sync/b2-sha1-reader.js.map +1 -1
  232. package/dist/sync/download-staging.cjs +11 -10
  233. package/dist/sync/download-staging.cjs.map +1 -1
  234. package/dist/sync/download-staging.d.cts +2 -1
  235. package/dist/sync/download-staging.d.cts.map +1 -1
  236. package/dist/sync/download-staging.d.ts +2 -1
  237. package/dist/sync/download-staging.d.ts.map +1 -1
  238. package/dist/sync/download-staging.js +11 -10
  239. package/dist/sync/download-staging.js.map +1 -1
  240. package/dist/sync/filters.cjs.map +1 -1
  241. package/dist/sync/filters.js.map +1 -1
  242. package/dist/sync/local-file-io.cjs +11 -6
  243. package/dist/sync/local-file-io.cjs.map +1 -1
  244. package/dist/sync/local-file-io.d.cts +1 -0
  245. package/dist/sync/local-file-io.d.cts.map +1 -1
  246. package/dist/sync/local-file-io.d.ts +1 -0
  247. package/dist/sync/local-file-io.d.ts.map +1 -1
  248. package/dist/sync/local-file-io.js +11 -6
  249. package/dist/sync/local-file-io.js.map +1 -1
  250. package/dist/sync/local-sha1.cjs +6 -15
  251. package/dist/sync/local-sha1.cjs.map +1 -1
  252. package/dist/sync/local-sha1.d.cts +0 -8
  253. package/dist/sync/local-sha1.d.cts.map +1 -1
  254. package/dist/sync/local-sha1.d.ts +0 -8
  255. package/dist/sync/local-sha1.d.ts.map +1 -1
  256. package/dist/sync/local-sha1.js +7 -15
  257. package/dist/sync/local-sha1.js.map +1 -1
  258. package/dist/sync/policies/compare.cjs +5 -3
  259. package/dist/sync/policies/compare.cjs.map +1 -1
  260. package/dist/sync/policies/compare.d.cts.map +1 -1
  261. package/dist/sync/policies/compare.d.ts.map +1 -1
  262. package/dist/sync/policies/compare.js +6 -4
  263. package/dist/sync/policies/compare.js.map +1 -1
  264. package/dist/sync/policies/index.cjs +4 -10
  265. package/dist/sync/policies/index.cjs.map +1 -1
  266. package/dist/sync/policies/index.js +4 -10
  267. package/dist/sync/policies/index.js.map +1 -1
  268. package/dist/sync/scanners/b2.cjs +2 -2
  269. package/dist/sync/scanners/b2.cjs.map +1 -1
  270. package/dist/sync/scanners/b2.js +2 -2
  271. package/dist/sync/scanners/b2.js.map +1 -1
  272. package/dist/sync/scanners/local.cjs.map +1 -1
  273. package/dist/sync/scanners/local.js.map +1 -1
  274. package/dist/sync/synchronizer.cjs +3 -2
  275. package/dist/sync/synchronizer.cjs.map +1 -1
  276. package/dist/sync/synchronizer.js +3 -2
  277. package/dist/sync/synchronizer.js.map +1 -1
  278. package/dist/types/auth.cjs +4 -0
  279. package/dist/types/auth.cjs.map +1 -1
  280. package/dist/types/auth.d.cts +4 -0
  281. package/dist/types/auth.d.cts.map +1 -1
  282. package/dist/types/auth.d.ts +4 -0
  283. package/dist/types/auth.d.ts.map +1 -1
  284. package/dist/types/auth.js +4 -0
  285. package/dist/types/auth.js.map +1 -1
  286. package/dist/types/backup.d.cts +80 -0
  287. package/dist/types/backup.d.cts.map +1 -0
  288. package/dist/types/backup.d.ts +80 -0
  289. package/dist/types/backup.d.ts.map +1 -0
  290. package/dist/types/bucket.cjs.map +1 -1
  291. package/dist/types/bucket.d.cts +4 -2
  292. package/dist/types/bucket.d.cts.map +1 -1
  293. package/dist/types/bucket.d.ts +4 -2
  294. package/dist/types/bucket.d.ts.map +1 -1
  295. package/dist/types/bucket.js.map +1 -1
  296. package/dist/types/download.cjs +62 -0
  297. package/dist/types/download.cjs.map +1 -0
  298. package/dist/types/download.d.cts +98 -0
  299. package/dist/types/download.d.cts.map +1 -1
  300. package/dist/types/download.d.ts +98 -0
  301. package/dist/types/download.d.ts.map +1 -1
  302. package/dist/types/download.js +61 -0
  303. package/dist/types/download.js.map +1 -0
  304. package/dist/types/encryption.cjs +58 -229
  305. package/dist/types/encryption.cjs.map +1 -1
  306. package/dist/types/encryption.d.cts +32 -0
  307. package/dist/types/encryption.d.cts.map +1 -1
  308. package/dist/types/encryption.d.ts +32 -0
  309. package/dist/types/encryption.d.ts.map +1 -1
  310. package/dist/types/encryption.js +56 -229
  311. package/dist/types/encryption.js.map +1 -1
  312. package/dist/types/errors.cjs +9 -0
  313. package/dist/types/errors.cjs.map +1 -1
  314. package/dist/types/errors.d.cts +1 -1
  315. package/dist/types/errors.d.cts.map +1 -1
  316. package/dist/types/errors.d.ts +1 -1
  317. package/dist/types/errors.d.ts.map +1 -1
  318. package/dist/types/errors.js +9 -0
  319. package/dist/types/errors.js.map +1 -1
  320. package/dist/types/file.cjs.map +1 -1
  321. package/dist/types/file.d.cts +15 -2
  322. package/dist/types/file.d.cts.map +1 -1
  323. package/dist/types/file.d.ts +15 -2
  324. package/dist/types/file.d.ts.map +1 -1
  325. package/dist/types/file.js.map +1 -1
  326. package/dist/types/ids.cjs +30 -0
  327. package/dist/types/ids.cjs.map +1 -1
  328. package/dist/types/ids.d.cts +32 -0
  329. package/dist/types/ids.d.cts.map +1 -1
  330. package/dist/types/ids.d.ts +32 -0
  331. package/dist/types/ids.d.ts.map +1 -1
  332. package/dist/types/ids.js +28 -1
  333. package/dist/types/ids.js.map +1 -1
  334. package/dist/types/index.d.cts +10 -6
  335. package/dist/types/index.d.cts.map +1 -1
  336. package/dist/types/index.d.ts +10 -6
  337. package/dist/types/index.d.ts.map +1 -1
  338. package/dist/types/lock.cjs.map +1 -1
  339. package/dist/types/lock.d.cts +14 -0
  340. package/dist/types/lock.d.cts.map +1 -1
  341. package/dist/types/lock.d.ts +14 -0
  342. package/dist/types/lock.d.ts.map +1 -1
  343. package/dist/types/lock.js.map +1 -1
  344. package/dist/types/notifications.cjs +1 -1
  345. package/dist/types/notifications.cjs.map +1 -1
  346. package/dist/types/notifications.d.cts +5 -3
  347. package/dist/types/notifications.d.cts.map +1 -1
  348. package/dist/types/notifications.d.ts +5 -3
  349. package/dist/types/notifications.d.ts.map +1 -1
  350. package/dist/types/notifications.js +1 -1
  351. package/dist/types/notifications.js.map +1 -1
  352. package/dist/types/partner.cjs +32 -0
  353. package/dist/types/partner.cjs.map +1 -0
  354. package/dist/types/partner.d.cts +394 -0
  355. package/dist/types/partner.d.cts.map +1 -0
  356. package/dist/types/partner.d.ts +394 -0
  357. package/dist/types/partner.d.ts.map +1 -0
  358. package/dist/types/partner.js +29 -0
  359. package/dist/types/partner.js.map +1 -0
  360. package/dist/types/upload.d.cts +31 -18
  361. package/dist/types/upload.d.cts.map +1 -1
  362. package/dist/types/upload.d.ts +31 -18
  363. package/dist/types/upload.d.ts.map +1 -1
  364. package/dist/upload/abort-scope.cjs +0 -45
  365. package/dist/upload/abort-scope.cjs.map +1 -1
  366. package/dist/upload/abort-scope.d.cts +0 -22
  367. package/dist/upload/abort-scope.d.cts.map +1 -1
  368. package/dist/upload/abort-scope.d.ts +0 -22
  369. package/dist/upload/abort-scope.d.ts.map +1 -1
  370. package/dist/upload/abort-scope.js +1 -44
  371. package/dist/upload/abort-scope.js.map +1 -1
  372. package/dist/upload/finish.cjs +3 -8
  373. package/dist/upload/finish.cjs.map +1 -1
  374. package/dist/upload/finish.d.cts.map +1 -1
  375. package/dist/upload/finish.d.ts.map +1 -1
  376. package/dist/upload/finish.js +1 -6
  377. package/dist/upload/finish.js.map +1 -1
  378. package/dist/upload/large.cjs +5 -1
  379. package/dist/upload/large.cjs.map +1 -1
  380. package/dist/upload/large.d.cts +16 -2
  381. package/dist/upload/large.d.cts.map +1 -1
  382. package/dist/upload/large.d.ts +16 -2
  383. package/dist/upload/large.d.ts.map +1 -1
  384. package/dist/upload/large.js +5 -1
  385. package/dist/upload/large.js.map +1 -1
  386. package/dist/upload/options.cjs.map +1 -1
  387. package/dist/upload/options.d.cts +12 -0
  388. package/dist/upload/options.d.cts.map +1 -1
  389. package/dist/upload/options.d.ts +12 -0
  390. package/dist/upload/options.d.ts.map +1 -1
  391. package/dist/upload/options.js.map +1 -1
  392. package/dist/upload/resume.cjs +2 -1
  393. package/dist/upload/resume.cjs.map +1 -1
  394. package/dist/upload/resume.d.cts +3 -1
  395. package/dist/upload/resume.d.cts.map +1 -1
  396. package/dist/upload/resume.d.ts +3 -1
  397. package/dist/upload/resume.d.ts.map +1 -1
  398. package/dist/upload/resume.js +2 -1
  399. package/dist/upload/resume.js.map +1 -1
  400. package/dist/upload/retry.cjs +8 -3
  401. package/dist/upload/retry.cjs.map +1 -1
  402. package/dist/upload/retry.js +8 -3
  403. package/dist/upload/retry.js.map +1 -1
  404. package/dist/upload/single.cjs +2 -1
  405. package/dist/upload/single.cjs.map +1 -1
  406. package/dist/upload/single.d.cts +6 -0
  407. package/dist/upload/single.d.cts.map +1 -1
  408. package/dist/upload/single.d.ts +6 -0
  409. package/dist/upload/single.d.ts.map +1 -1
  410. package/dist/upload/single.js +2 -1
  411. package/dist/upload/single.js.map +1 -1
  412. package/dist/upload/stream.cjs +6 -4
  413. package/dist/upload/stream.cjs.map +1 -1
  414. package/dist/upload/stream.d.cts +6 -0
  415. package/dist/upload/stream.d.cts.map +1 -1
  416. package/dist/upload/stream.d.ts +6 -0
  417. package/dist/upload/stream.d.ts.map +1 -1
  418. package/dist/upload/stream.js +3 -1
  419. package/dist/upload/stream.js.map +1 -1
  420. package/dist/util/abort.cjs +114 -0
  421. package/dist/util/abort.cjs.map +1 -0
  422. package/dist/util/abort.d.cts +65 -0
  423. package/dist/util/abort.d.cts.map +1 -0
  424. package/dist/util/abort.d.ts +65 -0
  425. package/dist/util/abort.d.ts.map +1 -0
  426. package/dist/util/abort.js +109 -0
  427. package/dist/util/abort.js.map +1 -0
  428. package/dist/util/defaults.cjs +3 -0
  429. package/dist/util/defaults.cjs.map +1 -1
  430. package/dist/util/defaults.d.cts +2 -0
  431. package/dist/util/defaults.d.cts.map +1 -1
  432. package/dist/util/defaults.d.ts +2 -0
  433. package/dist/util/defaults.d.ts.map +1 -1
  434. package/dist/util/defaults.js +3 -1
  435. package/dist/util/defaults.js.map +1 -1
  436. package/dist/util/md5.cjs +211 -0
  437. package/dist/util/md5.cjs.map +1 -0
  438. package/dist/util/md5.d.cts +43 -0
  439. package/dist/util/md5.d.cts.map +1 -0
  440. package/dist/util/md5.d.ts +43 -0
  441. package/dist/util/md5.d.ts.map +1 -0
  442. package/dist/util/md5.js +209 -0
  443. package/dist/util/md5.js.map +1 -0
  444. package/dist/util/normalize.cjs +5 -5
  445. package/dist/util/normalize.cjs.map +1 -1
  446. package/dist/util/normalize.d.cts +7 -7
  447. package/dist/util/normalize.d.cts.map +1 -1
  448. package/dist/util/normalize.d.ts +7 -7
  449. package/dist/util/normalize.d.ts.map +1 -1
  450. package/dist/util/normalize.js +5 -5
  451. package/dist/util/normalize.js.map +1 -1
  452. package/dist/util/paginator.cjs +7 -1
  453. package/dist/util/paginator.cjs.map +1 -1
  454. package/dist/util/paginator.d.cts +3 -1
  455. package/dist/util/paginator.d.cts.map +1 -1
  456. package/dist/util/paginator.d.ts +3 -1
  457. package/dist/util/paginator.d.ts.map +1 -1
  458. package/dist/util/paginator.js +7 -1
  459. package/dist/util/paginator.js.map +1 -1
  460. package/package.json +38 -16
@@ -0,0 +1,80 @@
1
+ import { AccountId, ComputerId } from './ids.js';
2
+ /**
3
+ * Request parameters for `bz_list_computers`.
4
+ *
5
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
6
+ */
7
+ export interface ListComputersRequest {
8
+ /** Account ID whose active computer backups should be listed. */
9
+ readonly accountId: AccountId;
10
+ /** Computer ID to start listing from for pagination. */
11
+ readonly startComputerId?: ComputerId;
12
+ /** Maximum number of computers to return. The documented range is 1 through 500. */
13
+ readonly maxComputerCount?: number;
14
+ }
15
+ /**
16
+ * Computer Backup record returned by list and delete operations.
17
+ *
18
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
19
+ */
20
+ export interface ComputerBackup {
21
+ /** Unique identifier for the computer backup. */
22
+ readonly computerId: ComputerId;
23
+ /** Name of the computer backup. */
24
+ readonly computerName: string;
25
+ /** Timestamp in milliseconds of the last file uploaded by the backup client. */
26
+ readonly lastFileUploadedTimestamp: number;
27
+ }
28
+ /**
29
+ * Result object returned by `bz_list_computers`.
30
+ *
31
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
32
+ */
33
+ export interface ListComputersResult {
34
+ /** Next computer ID to use for pagination, or null if all computers have been listed. */
35
+ readonly nextComputerId: ComputerId | null;
36
+ /** Active computer backups matching the request. */
37
+ readonly computers: readonly ComputerBackup[];
38
+ }
39
+ /**
40
+ * Wire response from `bz_list_computers`.
41
+ *
42
+ * The `bz_list_computers` wire response is a single JSON object containing a
43
+ * pagination cursor and the list of computers.
44
+ *
45
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
46
+ */
47
+ export type ListComputersResponse = ListComputersResult;
48
+ /**
49
+ * Request parameters for `bz_delete_computer`.
50
+ *
51
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
52
+ */
53
+ export interface DeleteComputerRequest {
54
+ /** Account ID that owns the computer backup. */
55
+ readonly accountId: AccountId;
56
+ /** Computer ID of the backup to delete. */
57
+ readonly computerId: ComputerId;
58
+ }
59
+ /**
60
+ * Single result element returned by `bz_delete_computer`.
61
+ *
62
+ * The `bz_delete_computer` wire response is a JSON array of these objects.
63
+ *
64
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
65
+ */
66
+ export interface DeleteComputerResult {
67
+ /** Unique identifier for the deleted computer backup. */
68
+ readonly computerId: ComputerId;
69
+ /** Name of the deleted computer backup. */
70
+ readonly computerName: string;
71
+ /** Timestamp in milliseconds of the last file uploaded by the backup client. */
72
+ readonly lastFileUploadedTimestamp: number;
73
+ }
74
+ /**
75
+ * Array-shaped wire response from `bz_delete_computer`.
76
+ *
77
+ * @experimental Computer Backup API surface; shape may change as the Backup API docs evolve.
78
+ */
79
+ export type DeleteComputerResponse = readonly DeleteComputerResult[];
80
+ //# sourceMappingURL=backup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../src/types/backup.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,eAAe,CAAC,EAAE,UAAU,CAAA;IACrC,oFAAoF;IACpF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,mCAAmC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAA;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,QAAQ,CAAC,cAAc,EAAE,UAAU,GAAG,IAAI,CAAA;IAC1C,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAA;CAC9C;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAA;AAEvD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAA;CAC3C;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,oBAAoB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"bucket.cjs","names":[],"sources":["../../src/types/bucket.ts"],"sourcesContent":["import type { EncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId } from './ids.ts'\nimport type { ReplicationConfiguration } from './replication.ts'\n\n/**\n * Named constants for the bucket access level.\n *\n * The {@link BucketType} type alias is derived from the values of this\n * object, so the const is the single source of truth: adding a key here\n * automatically widens the type union.\n *\n * @example\n * ```ts\n * await client.createBucket({ bucketName: 'my-app-logs', bucketType: BucketType.AllPrivate })\n * ```\n */\nexport const BucketType = {\n /** Publicly downloadable without authentication. */\n AllPublic: 'allPublic',\n /** Requires a valid auth token to download. */\n AllPrivate: 'allPrivate',\n /** Internal snapshot bucket type, generally not user-created. */\n Snapshot: 'snapshot',\n /** B2-restricted bucket (e.g., for S3-compatible workflows). */\n Restricted: 'restricted',\n} as const\n\n/** Access level for a B2 bucket. Derived from {@link BucketType}. */\nexport type BucketType = (typeof BucketType)[keyof typeof BucketType]\n\n/** Rule that automatically hides or deletes files after a specified number of days. */\nexport interface LifecycleRule {\n /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */\n readonly daysFromHidingToDeleting: number | null\n /** Days after upload before automatic hiding, or null to never auto-hide. */\n readonly daysFromUploadingToHiding: number | null\n /** File name prefix this rule applies to. Empty string matches all files. */\n readonly fileNamePrefix: string\n}\n\n/**\n * Named constants for the B2 + S3 operations a CORS rule can permit.\n *\n * @example\n * ```ts\n * await bucket.update({\n * corsRules: [{\n * corsRuleName: 'browser-downloads',\n * allowedOrigins: ['https://example.com'],\n * allowedOperations: [CorsOperation.B2DownloadFileByName, CorsOperation.S3Get],\n * allowedHeaders: null,\n * exposeHeaders: null,\n * maxAgeSeconds: 3600,\n * }],\n * })\n * ```\n */\nexport const CorsOperation = {\n /** Native B2 download-by-name request. */\n B2DownloadFileByName: 'b2_download_file_by_name',\n /** Native B2 download-by-id request. */\n B2DownloadFileById: 'b2_download_file_by_id',\n /** Native B2 small-file upload. */\n B2UploadFile: 'b2_upload_file',\n /** Native B2 multipart-part upload. */\n B2UploadPart: 'b2_upload_part',\n /** S3-compatible DELETE. */\n S3Delete: 's3_delete',\n /** S3-compatible GET. */\n S3Get: 's3_get',\n /** S3-compatible HEAD. */\n S3Head: 's3_head',\n /** S3-compatible POST. */\n S3Post: 's3_post',\n /** S3-compatible PUT. */\n S3Put: 's3_put',\n} as const\n\n/**\n * A B2 or S3 operation that a CORS rule can permit. Derived from\n * {@link CorsOperation}.\n */\nexport type CorsOperation = (typeof CorsOperation)[keyof typeof CorsOperation]\n\n/** Cross-Origin Resource Sharing (CORS) rule for browser-based access to a bucket. */\nexport interface CorsRule {\n /** Unique name identifying this CORS rule within the bucket. */\n readonly corsRuleName: string\n /** Origins allowed to make cross-origin requests (e.g., `'https://example.com'`). */\n readonly allowedOrigins: readonly string[]\n /** B2 and S3 operations permitted by this rule. */\n readonly allowedOperations: readonly CorsOperation[]\n /** Request headers allowed in preflight requests, or null if none are allowed. */\n readonly allowedHeaders: readonly string[] | null\n /** Response headers exposed to the browser, or null if none are exposed. */\n readonly exposeHeaders: readonly string[] | null\n /** Maximum time (in seconds) browsers may cache the preflight response. */\n readonly maxAgeSeconds: number\n}\n\n/**\n * Named constants for the bucket-level Object Lock retention mode.\n *\n * Pair with {@link BucketRetentionPolicy} when setting a bucket's default\n * retention: `{ mode: BucketRetentionMode.Compliance, period: { duration: 30, unit: 'days' } }`.\n */\nexport const BucketRetentionMode = {\n /** Files cannot be deleted or modified during the retention period, even by the account owner. */\n Compliance: 'compliance',\n /** Files cannot be deleted during retention except by callers with the `bypassGovernance` capability. */\n Governance: 'governance',\n /** No default retention is applied to new uploads. */\n None: 'none',\n} as const\n\n/** Bucket-level Object Lock retention mode. Derived from {@link BucketRetentionMode}. */\nexport type BucketRetentionMode = (typeof BucketRetentionMode)[keyof typeof BucketRetentionMode]\n\n/** Duration and unit for a retention period. */\nexport interface RetentionPeriod {\n /** Length of the retention period. */\n readonly duration: number\n /** Time unit for the retention period. */\n readonly unit: 'days' | 'years'\n}\n\n/** Default Object Lock retention policy applied to new files in a bucket. */\nexport interface BucketRetentionPolicy {\n /** Retention mode for the policy. */\n readonly mode: BucketRetentionMode\n /** Retention period, or null when mode is `'none'`. */\n readonly period: RetentionPeriod | null\n}\n\n/**\n * Complete bucket metadata as returned by the B2 API.\n * Corresponds to the bucket object in responses from `b2_list_buckets`, `b2_create_bucket`, and `b2_update_bucket`.\n */\nexport interface BucketInfo {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Unique identifier for this bucket. */\n readonly bucketId: BucketId\n /** Globally unique name of this bucket. */\n readonly bucketName: string\n /** Access level of this bucket. */\n readonly bucketType: BucketType\n /** User-defined key-value metadata stored on the bucket. */\n readonly bucketInfo: Record<string, string>\n /** CORS rules configured on this bucket. */\n readonly corsRules: readonly CorsRule[]\n /** Default server-side encryption setting for new files in this bucket. */\n readonly defaultServerSideEncryption: EncryptionSetting\n /** File Lock configuration including authorization status and current settings. */\n readonly fileLockConfiguration: {\n /** Whether the caller is authorized to read file lock settings. */\n readonly isClientAuthorizedToRead: boolean\n /** File lock settings, or null if the caller lacks read authorization. */\n readonly value: {\n /** Whether Object Lock is enabled on this bucket. */\n readonly isFileLockEnabled: boolean\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n } | null\n }\n /** Lifecycle rules configured on this bucket. */\n readonly lifecycleRules: readonly LifecycleRule[]\n /** Set of options enabled on this bucket (e.g., `'s3'`). */\n readonly options: readonly string[]\n /** Monotonically increasing revision number, incremented on each bucket update. */\n readonly revision: number\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n /** Cross-region replication configuration for this bucket. */\n readonly replicationConfiguration: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_create_bucket` API call.\n */\nexport interface CreateBucketRequest {\n /** Account that will own the new bucket. */\n readonly accountId: AccountId\n /** Globally unique name for the bucket. */\n readonly bucketName: string\n /** Access level for the bucket. */\n readonly bucketType: BucketType\n /** Optional user-defined key-value metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Optional CORS rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Optional default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Optional default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock on the bucket. Cannot be changed after creation. */\n readonly fileLockEnabled?: boolean\n /** Optional lifecycle rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Optional replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_update_bucket` API call.\n */\nexport interface UpdateBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to update. */\n readonly bucketId: BucketId\n /** New access level for the bucket. */\n readonly bucketType?: BucketType\n /** Updated user-defined key-value metadata. Replaces all existing metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Updated CORS rules. Replaces all existing rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Updated default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Updated default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock. Can only transition from disabled to enabled. */\n readonly fileLockEnabled?: boolean\n /** Updated lifecycle rules. Replaces all existing rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Updated replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n /** Optimistic locking: only update if the bucket's current revision matches this value. */\n readonly ifRevisionIs?: number\n}\n\n/**\n * Request parameters for the `b2_list_buckets` API call.\n */\nexport interface ListBucketsRequest {\n /** Account whose buckets to list. */\n readonly accountId: AccountId\n /** Optional filter to return only the bucket with this ID. */\n readonly bucketId?: BucketId\n /** Optional filter to return only the bucket with this name. */\n readonly bucketName?: string\n /** Optional filter to return only buckets of these types. */\n readonly bucketTypes?: readonly BucketType[]\n}\n\n/** Response from the `b2_list_buckets` API call. */\nexport interface ListBucketsResponse {\n /** Array of buckets matching the request filters. */\n readonly buckets: readonly BucketInfo[]\n}\n\n/**\n * Request parameters for the `b2_delete_bucket` API call.\n */\nexport interface DeleteBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to delete. The bucket must be empty. */\n readonly bucketId: BucketId\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,aAAa;;CAExB,WAAW;;CAEX,YAAY;;CAEZ,UAAU;;CAEV,YAAY;AACd;;;;;;;;;;;;;;;;;;AAgCA,IAAa,gBAAgB;;CAE3B,sBAAsB;;CAEtB,oBAAoB;;CAEpB,cAAc;;CAEd,cAAc;;CAEd,UAAU;;CAEV,OAAO;;CAEP,QAAQ;;CAER,QAAQ;;CAER,OAAO;AACT;;;;;;;AA8BA,IAAa,sBAAsB;;CAEjC,YAAY;;CAEZ,YAAY;;CAEZ,MAAM;AACR"}
1
+ {"version":3,"file":"bucket.cjs","names":[],"sources":["../../src/types/bucket.ts"],"sourcesContent":["import type { EncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId } from './ids.ts'\nimport type { ReplicationConfiguration } from './replication.ts'\n\n/**\n * Named constants for the bucket access level.\n *\n * The {@link BucketType} type alias is derived from the values of this\n * object, so the const is the single source of truth: adding a key here\n * automatically widens the type union.\n *\n * @example\n * ```ts\n * await client.createBucket({ bucketName: 'my-app-logs', bucketType: BucketType.AllPrivate })\n * ```\n */\nexport const BucketType = {\n /** Publicly downloadable without authentication. */\n AllPublic: 'allPublic',\n /** Requires a valid auth token to download. */\n AllPrivate: 'allPrivate',\n /** Internal snapshot bucket type, generally not user-created. */\n Snapshot: 'snapshot',\n /** B2-restricted bucket (e.g., for S3-compatible workflows). */\n Restricted: 'restricted',\n} as const\n\n/** Access level for a B2 bucket. Derived from {@link BucketType}. */\nexport type BucketType = (typeof BucketType)[keyof typeof BucketType]\n\n/** Rule that automatically hides or deletes files after a specified number of days. */\nexport interface LifecycleRule {\n /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */\n readonly daysFromHidingToDeleting?: number | null\n /** Days after upload before automatic hiding, or null to never auto-hide. */\n readonly daysFromUploadingToHiding?: number | null\n /** Days after starting before automatic cancellation of unfinished large files, or null to never auto-cancel. */\n readonly daysFromStartingToCancelingUnfinishedLargeFiles?: number | null\n /** File name prefix this rule applies to. Empty string matches all files. */\n readonly fileNamePrefix: string\n}\n\n/**\n * Named constants for the B2 + S3 operations a CORS rule can permit.\n *\n * @example\n * ```ts\n * await bucket.update({\n * corsRules: [{\n * corsRuleName: 'browser-downloads',\n * allowedOrigins: ['https://example.com'],\n * allowedOperations: [CorsOperation.B2DownloadFileByName, CorsOperation.S3Get],\n * allowedHeaders: null,\n * exposeHeaders: null,\n * maxAgeSeconds: 3600,\n * }],\n * })\n * ```\n */\nexport const CorsOperation = {\n /** Native B2 download-by-name request. */\n B2DownloadFileByName: 'b2_download_file_by_name',\n /** Native B2 download-by-id request. */\n B2DownloadFileById: 'b2_download_file_by_id',\n /** Native B2 small-file upload. */\n B2UploadFile: 'b2_upload_file',\n /** Native B2 multipart-part upload. */\n B2UploadPart: 'b2_upload_part',\n /** S3-compatible DELETE. */\n S3Delete: 's3_delete',\n /** S3-compatible GET. */\n S3Get: 's3_get',\n /** S3-compatible HEAD. */\n S3Head: 's3_head',\n /** S3-compatible POST. */\n S3Post: 's3_post',\n /** S3-compatible PUT. */\n S3Put: 's3_put',\n} as const\n\n/**\n * A B2 or S3 operation that a CORS rule can permit. Derived from\n * {@link CorsOperation}.\n */\nexport type CorsOperation = (typeof CorsOperation)[keyof typeof CorsOperation]\n\n/** Cross-Origin Resource Sharing (CORS) rule for browser-based access to a bucket. */\nexport interface CorsRule {\n /** Unique name identifying this CORS rule within the bucket. */\n readonly corsRuleName: string\n /** Origins allowed to make cross-origin requests (e.g., `'https://example.com'`). */\n readonly allowedOrigins: readonly string[]\n /** B2 and S3 operations permitted by this rule. */\n readonly allowedOperations: readonly CorsOperation[]\n /** Request headers allowed in preflight requests, or null if none are allowed. */\n readonly allowedHeaders: readonly string[] | null\n /** Response headers exposed to the browser, or null if none are exposed. */\n readonly exposeHeaders: readonly string[] | null\n /** Maximum time (in seconds) browsers may cache the preflight response. */\n readonly maxAgeSeconds: number\n}\n\n/**\n * Named constants for the bucket-level Object Lock retention mode.\n *\n * Pair with {@link BucketRetentionPolicy} when setting a bucket's default\n * retention: `{ mode: BucketRetentionMode.Compliance, period: { duration: 30, unit: 'days' } }`.\n */\nexport const BucketRetentionMode = {\n /** Files cannot be deleted or modified during the retention period, even by the account owner. */\n Compliance: 'compliance',\n /** Files cannot be deleted during retention except by callers with the `bypassGovernance` capability. */\n Governance: 'governance',\n /** No default retention is applied to new uploads. */\n None: 'none',\n} as const\n\n/** Bucket-level Object Lock retention mode. Derived from {@link BucketRetentionMode}. */\nexport type BucketRetentionMode = (typeof BucketRetentionMode)[keyof typeof BucketRetentionMode]\n\n/** Duration and unit for a retention period. */\nexport interface RetentionPeriod {\n /** Length of the retention period. */\n readonly duration: number\n /** Time unit for the retention period. */\n readonly unit: 'days' | 'years'\n}\n\n/** Default Object Lock retention policy applied to new files in a bucket. */\nexport interface BucketRetentionPolicy {\n /** Retention mode for the policy. */\n readonly mode: BucketRetentionMode\n /** Retention period, or null when mode is `'none'`. */\n readonly period: RetentionPeriod | null\n}\n\n/**\n * Complete bucket metadata as returned by the B2 API.\n * Corresponds to the bucket object in responses from `b2_list_buckets`, `b2_create_bucket`, and `b2_update_bucket`.\n */\nexport interface BucketInfo {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Unique identifier for this bucket. */\n readonly bucketId: BucketId\n /** Globally unique name of this bucket. */\n readonly bucketName: string\n /** Access level of this bucket. */\n readonly bucketType: BucketType\n /** User-defined key-value metadata stored on the bucket. */\n readonly bucketInfo: Record<string, string>\n /** CORS rules configured on this bucket. */\n readonly corsRules: readonly CorsRule[]\n /** Default server-side encryption setting for new files in this bucket. */\n readonly defaultServerSideEncryption: EncryptionSetting\n /** File Lock configuration including authorization status and current settings. */\n readonly fileLockConfiguration: {\n /** Whether the caller is authorized to read file lock settings. */\n readonly isClientAuthorizedToRead: boolean\n /** File lock settings, or null if the caller lacks read authorization. */\n readonly value: {\n /** Whether Object Lock is enabled on this bucket. */\n readonly isFileLockEnabled: boolean\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n } | null\n }\n /** Lifecycle rules configured on this bucket. */\n readonly lifecycleRules: readonly LifecycleRule[]\n /** Set of options enabled on this bucket (e.g., `'s3'`). */\n readonly options: readonly string[]\n /** Monotonically increasing revision number, incremented on each bucket update. */\n readonly revision: number\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n /** Cross-region replication configuration for this bucket. */\n readonly replicationConfiguration: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_create_bucket` API call.\n */\nexport interface CreateBucketRequest {\n /** Account that will own the new bucket. */\n readonly accountId: AccountId\n /** Globally unique name for the bucket. */\n readonly bucketName: string\n /** Access level for the bucket. */\n readonly bucketType: BucketType\n /** Optional user-defined key-value metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Optional CORS rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Optional default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Optional default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock on the bucket. Cannot be changed after creation. */\n readonly fileLockEnabled?: boolean\n /** Optional lifecycle rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Optional replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_update_bucket` API call.\n */\nexport interface UpdateBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to update. */\n readonly bucketId: BucketId\n /** New access level for the bucket. */\n readonly bucketType?: BucketType\n /** Updated user-defined key-value metadata. Replaces all existing metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Updated CORS rules. Replaces all existing rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Updated default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Updated default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock. Can only transition from disabled to enabled. */\n readonly fileLockEnabled?: boolean\n /** Updated lifecycle rules. Replaces all existing rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Updated replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n /** Optimistic locking: only update if the bucket's current revision matches this value. */\n readonly ifRevisionIs?: number\n}\n\n/**\n * Request parameters for the `b2_list_buckets` API call.\n */\nexport interface ListBucketsRequest {\n /** Account whose buckets to list. */\n readonly accountId: AccountId\n /** Optional filter to return only the bucket with this ID. */\n readonly bucketId?: BucketId\n /** Optional filter to return only the bucket with this name. */\n readonly bucketName?: string\n /** Optional filter to return only buckets of these types. */\n readonly bucketTypes?: readonly BucketType[]\n}\n\n/** Response from the `b2_list_buckets` API call. */\nexport interface ListBucketsResponse {\n /** Array of buckets matching the request filters. */\n readonly buckets: readonly BucketInfo[]\n}\n\n/**\n * Request parameters for the `b2_delete_bucket` API call.\n */\nexport interface DeleteBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to delete. The bucket must be empty. */\n readonly bucketId: BucketId\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,aAAa;;CAExB,WAAW;;CAEX,YAAY;;CAEZ,UAAU;;CAEV,YAAY;AACd;;;;;;;;;;;;;;;;;;AAkCA,IAAa,gBAAgB;;CAE3B,sBAAsB;;CAEtB,oBAAoB;;CAEpB,cAAc;;CAEd,cAAc;;CAEd,UAAU;;CAEV,OAAO;;CAEP,QAAQ;;CAER,QAAQ;;CAER,OAAO;AACT;;;;;;;AA8BA,IAAa,sBAAsB;;CAEjC,YAAY;;CAEZ,YAAY;;CAEZ,MAAM;AACR"}
@@ -28,9 +28,11 @@ export type BucketType = (typeof BucketType)[keyof typeof BucketType];
28
28
  /** Rule that automatically hides or deletes files after a specified number of days. */
29
29
  export interface LifecycleRule {
30
30
  /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */
31
- readonly daysFromHidingToDeleting: number | null;
31
+ readonly daysFromHidingToDeleting?: number | null;
32
32
  /** Days after upload before automatic hiding, or null to never auto-hide. */
33
- readonly daysFromUploadingToHiding: number | null;
33
+ readonly daysFromUploadingToHiding?: number | null;
34
+ /** Days after starting before automatic cancellation of unfinished large files, or null to never auto-cancel. */
35
+ readonly daysFromStartingToCancelingUnfinishedLargeFiles?: number | null;
34
36
  /** File name prefix this rule applies to. Empty string matches all files. */
35
37
  readonly fileNamePrefix: string;
36
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../../src/types/bucket.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,O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AAC,EAAE,qBAAqB,CAAA;IACjD,mFAAmF;IACnF,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IAClD,yCAAyC;IACzC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IAC5D,2FAA2F;IAC3F,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,UAAU,EAAE,CAAA;CAC7C;AAED,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAC5B"}
@@ -28,9 +28,11 @@ export type BucketType = (typeof BucketType)[keyof typeof BucketType];
28
28
  /** Rule that automatically hides or deletes files after a specified number of days. */
29
29
  export interface LifecycleRule {
30
30
  /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */
31
- readonly daysFromHidingToDeleting: number | null;
31
+ readonly daysFromHidingToDeleting?: number | null;
32
32
  /** Days after upload before automatic hiding, or null to never auto-hide. */
33
- readonly daysFromUploadingToHiding: number | null;
33
+ readonly daysFromUploadingToHiding?: number | null;
34
+ /** Days after starting before automatic cancellation of unfinished large files, or null to never auto-cancel. */
35
+ readonly daysFromStartingToCancelingUnfinishedLargeFiles?: number | null;
34
36
  /** File name prefix this rule applies to. Empty string matches all files. */
35
37
  readonly fileNamePrefix: string;
36
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../../src/types/bucket.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU;IACrB,oDAAoD;;IAEpD,+CAA+C;;IAE/C,iEAAiE;;IAEjE,gEAAgE;;CAExD,CAAA;AAEV,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAErE,uFAAuF;AACvF,MAAM,WAAW,aAAa;IAC5B,8FAA8F;IAC9F,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChD,6EAA6E;IAC7E,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjD,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa;IACxB,0CAA0C;;IAE1C,wCAAwC;;IAExC,mCAAmC;;IAEnC,uCAAuC;;IAEvC,4BAA4B;;IAE5B,yBAAyB;;IAEzB,0BAA0B;;IAE1B,0BAA0B;;IAE1B,yBAAyB;;CAEjB,CAAA;AAEV;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE9E,sF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"file":"bucket.js","names":[],"sources":["../../src/types/bucket.ts"],"sourcesContent":["import type { EncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId } from './ids.ts'\nimport type { ReplicationConfiguration } from './replication.ts'\n\n/**\n * Named constants for the bucket access level.\n *\n * The {@link BucketType} type alias is derived from the values of this\n * object, so the const is the single source of truth: adding a key here\n * automatically widens the type union.\n *\n * @example\n * ```ts\n * await client.createBucket({ bucketName: 'my-app-logs', bucketType: BucketType.AllPrivate })\n * ```\n */\nexport const BucketType = {\n /** Publicly downloadable without authentication. */\n AllPublic: 'allPublic',\n /** Requires a valid auth token to download. */\n AllPrivate: 'allPrivate',\n /** Internal snapshot bucket type, generally not user-created. */\n Snapshot: 'snapshot',\n /** B2-restricted bucket (e.g., for S3-compatible workflows). */\n Restricted: 'restricted',\n} as const\n\n/** Access level for a B2 bucket. Derived from {@link BucketType}. */\nexport type BucketType = (typeof BucketType)[keyof typeof BucketType]\n\n/** Rule that automatically hides or deletes files after a specified number of days. */\nexport interface LifecycleRule {\n /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */\n readonly daysFromHidingToDeleting: number | null\n /** Days after upload before automatic hiding, or null to never auto-hide. */\n readonly daysFromUploadingToHiding: number | null\n /** File name prefix this rule applies to. Empty string matches all files. */\n readonly fileNamePrefix: string\n}\n\n/**\n * Named constants for the B2 + S3 operations a CORS rule can permit.\n *\n * @example\n * ```ts\n * await bucket.update({\n * corsRules: [{\n * corsRuleName: 'browser-downloads',\n * allowedOrigins: ['https://example.com'],\n * allowedOperations: [CorsOperation.B2DownloadFileByName, CorsOperation.S3Get],\n * allowedHeaders: null,\n * exposeHeaders: null,\n * maxAgeSeconds: 3600,\n * }],\n * })\n * ```\n */\nexport const CorsOperation = {\n /** Native B2 download-by-name request. */\n B2DownloadFileByName: 'b2_download_file_by_name',\n /** Native B2 download-by-id request. */\n B2DownloadFileById: 'b2_download_file_by_id',\n /** Native B2 small-file upload. */\n B2UploadFile: 'b2_upload_file',\n /** Native B2 multipart-part upload. */\n B2UploadPart: 'b2_upload_part',\n /** S3-compatible DELETE. */\n S3Delete: 's3_delete',\n /** S3-compatible GET. */\n S3Get: 's3_get',\n /** S3-compatible HEAD. */\n S3Head: 's3_head',\n /** S3-compatible POST. */\n S3Post: 's3_post',\n /** S3-compatible PUT. */\n S3Put: 's3_put',\n} as const\n\n/**\n * A B2 or S3 operation that a CORS rule can permit. Derived from\n * {@link CorsOperation}.\n */\nexport type CorsOperation = (typeof CorsOperation)[keyof typeof CorsOperation]\n\n/** Cross-Origin Resource Sharing (CORS) rule for browser-based access to a bucket. */\nexport interface CorsRule {\n /** Unique name identifying this CORS rule within the bucket. */\n readonly corsRuleName: string\n /** Origins allowed to make cross-origin requests (e.g., `'https://example.com'`). */\n readonly allowedOrigins: readonly string[]\n /** B2 and S3 operations permitted by this rule. */\n readonly allowedOperations: readonly CorsOperation[]\n /** Request headers allowed in preflight requests, or null if none are allowed. */\n readonly allowedHeaders: readonly string[] | null\n /** Response headers exposed to the browser, or null if none are exposed. */\n readonly exposeHeaders: readonly string[] | null\n /** Maximum time (in seconds) browsers may cache the preflight response. */\n readonly maxAgeSeconds: number\n}\n\n/**\n * Named constants for the bucket-level Object Lock retention mode.\n *\n * Pair with {@link BucketRetentionPolicy} when setting a bucket's default\n * retention: `{ mode: BucketRetentionMode.Compliance, period: { duration: 30, unit: 'days' } }`.\n */\nexport const BucketRetentionMode = {\n /** Files cannot be deleted or modified during the retention period, even by the account owner. */\n Compliance: 'compliance',\n /** Files cannot be deleted during retention except by callers with the `bypassGovernance` capability. */\n Governance: 'governance',\n /** No default retention is applied to new uploads. */\n None: 'none',\n} as const\n\n/** Bucket-level Object Lock retention mode. Derived from {@link BucketRetentionMode}. */\nexport type BucketRetentionMode = (typeof BucketRetentionMode)[keyof typeof BucketRetentionMode]\n\n/** Duration and unit for a retention period. */\nexport interface RetentionPeriod {\n /** Length of the retention period. */\n readonly duration: number\n /** Time unit for the retention period. */\n readonly unit: 'days' | 'years'\n}\n\n/** Default Object Lock retention policy applied to new files in a bucket. */\nexport interface BucketRetentionPolicy {\n /** Retention mode for the policy. */\n readonly mode: BucketRetentionMode\n /** Retention period, or null when mode is `'none'`. */\n readonly period: RetentionPeriod | null\n}\n\n/**\n * Complete bucket metadata as returned by the B2 API.\n * Corresponds to the bucket object in responses from `b2_list_buckets`, `b2_create_bucket`, and `b2_update_bucket`.\n */\nexport interface BucketInfo {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Unique identifier for this bucket. */\n readonly bucketId: BucketId\n /** Globally unique name of this bucket. */\n readonly bucketName: string\n /** Access level of this bucket. */\n readonly bucketType: BucketType\n /** User-defined key-value metadata stored on the bucket. */\n readonly bucketInfo: Record<string, string>\n /** CORS rules configured on this bucket. */\n readonly corsRules: readonly CorsRule[]\n /** Default server-side encryption setting for new files in this bucket. */\n readonly defaultServerSideEncryption: EncryptionSetting\n /** File Lock configuration including authorization status and current settings. */\n readonly fileLockConfiguration: {\n /** Whether the caller is authorized to read file lock settings. */\n readonly isClientAuthorizedToRead: boolean\n /** File lock settings, or null if the caller lacks read authorization. */\n readonly value: {\n /** Whether Object Lock is enabled on this bucket. */\n readonly isFileLockEnabled: boolean\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n } | null\n }\n /** Lifecycle rules configured on this bucket. */\n readonly lifecycleRules: readonly LifecycleRule[]\n /** Set of options enabled on this bucket (e.g., `'s3'`). */\n readonly options: readonly string[]\n /** Monotonically increasing revision number, incremented on each bucket update. */\n readonly revision: number\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n /** Cross-region replication configuration for this bucket. */\n readonly replicationConfiguration: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_create_bucket` API call.\n */\nexport interface CreateBucketRequest {\n /** Account that will own the new bucket. */\n readonly accountId: AccountId\n /** Globally unique name for the bucket. */\n readonly bucketName: string\n /** Access level for the bucket. */\n readonly bucketType: BucketType\n /** Optional user-defined key-value metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Optional CORS rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Optional default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Optional default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock on the bucket. Cannot be changed after creation. */\n readonly fileLockEnabled?: boolean\n /** Optional lifecycle rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Optional replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_update_bucket` API call.\n */\nexport interface UpdateBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to update. */\n readonly bucketId: BucketId\n /** New access level for the bucket. */\n readonly bucketType?: BucketType\n /** Updated user-defined key-value metadata. Replaces all existing metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Updated CORS rules. Replaces all existing rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Updated default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Updated default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock. Can only transition from disabled to enabled. */\n readonly fileLockEnabled?: boolean\n /** Updated lifecycle rules. Replaces all existing rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Updated replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n /** Optimistic locking: only update if the bucket's current revision matches this value. */\n readonly ifRevisionIs?: number\n}\n\n/**\n * Request parameters for the `b2_list_buckets` API call.\n */\nexport interface ListBucketsRequest {\n /** Account whose buckets to list. */\n readonly accountId: AccountId\n /** Optional filter to return only the bucket with this ID. */\n readonly bucketId?: BucketId\n /** Optional filter to return only the bucket with this name. */\n readonly bucketName?: string\n /** Optional filter to return only buckets of these types. */\n readonly bucketTypes?: readonly BucketType[]\n}\n\n/** Response from the `b2_list_buckets` API call. */\nexport interface ListBucketsResponse {\n /** Array of buckets matching the request filters. */\n readonly buckets: readonly BucketInfo[]\n}\n\n/**\n * Request parameters for the `b2_delete_bucket` API call.\n */\nexport interface DeleteBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to delete. The bucket must be empty. */\n readonly bucketId: BucketId\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,aAAa;;CAExB,WAAW;;CAEX,YAAY;;CAEZ,UAAU;;CAEV,YAAY;AACd;;;;;;;;;;;;;;;;;;AAgCA,IAAa,gBAAgB;;CAE3B,sBAAsB;;CAEtB,oBAAoB;;CAEpB,cAAc;;CAEd,cAAc;;CAEd,UAAU;;CAEV,OAAO;;CAEP,QAAQ;;CAER,QAAQ;;CAER,OAAO;AACT;;;;;;;AA8BA,IAAa,sBAAsB;;CAEjC,YAAY;;CAEZ,YAAY;;CAEZ,MAAM;AACR"}
1
+ {"version":3,"file":"bucket.js","names":[],"sources":["../../src/types/bucket.ts"],"sourcesContent":["import type { EncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId } from './ids.ts'\nimport type { ReplicationConfiguration } from './replication.ts'\n\n/**\n * Named constants for the bucket access level.\n *\n * The {@link BucketType} type alias is derived from the values of this\n * object, so the const is the single source of truth: adding a key here\n * automatically widens the type union.\n *\n * @example\n * ```ts\n * await client.createBucket({ bucketName: 'my-app-logs', bucketType: BucketType.AllPrivate })\n * ```\n */\nexport const BucketType = {\n /** Publicly downloadable without authentication. */\n AllPublic: 'allPublic',\n /** Requires a valid auth token to download. */\n AllPrivate: 'allPrivate',\n /** Internal snapshot bucket type, generally not user-created. */\n Snapshot: 'snapshot',\n /** B2-restricted bucket (e.g., for S3-compatible workflows). */\n Restricted: 'restricted',\n} as const\n\n/** Access level for a B2 bucket. Derived from {@link BucketType}. */\nexport type BucketType = (typeof BucketType)[keyof typeof BucketType]\n\n/** Rule that automatically hides or deletes files after a specified number of days. */\nexport interface LifecycleRule {\n /** Days after hiding before automatic deletion, or null to never auto-delete hidden files. */\n readonly daysFromHidingToDeleting?: number | null\n /** Days after upload before automatic hiding, or null to never auto-hide. */\n readonly daysFromUploadingToHiding?: number | null\n /** Days after starting before automatic cancellation of unfinished large files, or null to never auto-cancel. */\n readonly daysFromStartingToCancelingUnfinishedLargeFiles?: number | null\n /** File name prefix this rule applies to. Empty string matches all files. */\n readonly fileNamePrefix: string\n}\n\n/**\n * Named constants for the B2 + S3 operations a CORS rule can permit.\n *\n * @example\n * ```ts\n * await bucket.update({\n * corsRules: [{\n * corsRuleName: 'browser-downloads',\n * allowedOrigins: ['https://example.com'],\n * allowedOperations: [CorsOperation.B2DownloadFileByName, CorsOperation.S3Get],\n * allowedHeaders: null,\n * exposeHeaders: null,\n * maxAgeSeconds: 3600,\n * }],\n * })\n * ```\n */\nexport const CorsOperation = {\n /** Native B2 download-by-name request. */\n B2DownloadFileByName: 'b2_download_file_by_name',\n /** Native B2 download-by-id request. */\n B2DownloadFileById: 'b2_download_file_by_id',\n /** Native B2 small-file upload. */\n B2UploadFile: 'b2_upload_file',\n /** Native B2 multipart-part upload. */\n B2UploadPart: 'b2_upload_part',\n /** S3-compatible DELETE. */\n S3Delete: 's3_delete',\n /** S3-compatible GET. */\n S3Get: 's3_get',\n /** S3-compatible HEAD. */\n S3Head: 's3_head',\n /** S3-compatible POST. */\n S3Post: 's3_post',\n /** S3-compatible PUT. */\n S3Put: 's3_put',\n} as const\n\n/**\n * A B2 or S3 operation that a CORS rule can permit. Derived from\n * {@link CorsOperation}.\n */\nexport type CorsOperation = (typeof CorsOperation)[keyof typeof CorsOperation]\n\n/** Cross-Origin Resource Sharing (CORS) rule for browser-based access to a bucket. */\nexport interface CorsRule {\n /** Unique name identifying this CORS rule within the bucket. */\n readonly corsRuleName: string\n /** Origins allowed to make cross-origin requests (e.g., `'https://example.com'`). */\n readonly allowedOrigins: readonly string[]\n /** B2 and S3 operations permitted by this rule. */\n readonly allowedOperations: readonly CorsOperation[]\n /** Request headers allowed in preflight requests, or null if none are allowed. */\n readonly allowedHeaders: readonly string[] | null\n /** Response headers exposed to the browser, or null if none are exposed. */\n readonly exposeHeaders: readonly string[] | null\n /** Maximum time (in seconds) browsers may cache the preflight response. */\n readonly maxAgeSeconds: number\n}\n\n/**\n * Named constants for the bucket-level Object Lock retention mode.\n *\n * Pair with {@link BucketRetentionPolicy} when setting a bucket's default\n * retention: `{ mode: BucketRetentionMode.Compliance, period: { duration: 30, unit: 'days' } }`.\n */\nexport const BucketRetentionMode = {\n /** Files cannot be deleted or modified during the retention period, even by the account owner. */\n Compliance: 'compliance',\n /** Files cannot be deleted during retention except by callers with the `bypassGovernance` capability. */\n Governance: 'governance',\n /** No default retention is applied to new uploads. */\n None: 'none',\n} as const\n\n/** Bucket-level Object Lock retention mode. Derived from {@link BucketRetentionMode}. */\nexport type BucketRetentionMode = (typeof BucketRetentionMode)[keyof typeof BucketRetentionMode]\n\n/** Duration and unit for a retention period. */\nexport interface RetentionPeriod {\n /** Length of the retention period. */\n readonly duration: number\n /** Time unit for the retention period. */\n readonly unit: 'days' | 'years'\n}\n\n/** Default Object Lock retention policy applied to new files in a bucket. */\nexport interface BucketRetentionPolicy {\n /** Retention mode for the policy. */\n readonly mode: BucketRetentionMode\n /** Retention period, or null when mode is `'none'`. */\n readonly period: RetentionPeriod | null\n}\n\n/**\n * Complete bucket metadata as returned by the B2 API.\n * Corresponds to the bucket object in responses from `b2_list_buckets`, `b2_create_bucket`, and `b2_update_bucket`.\n */\nexport interface BucketInfo {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Unique identifier for this bucket. */\n readonly bucketId: BucketId\n /** Globally unique name of this bucket. */\n readonly bucketName: string\n /** Access level of this bucket. */\n readonly bucketType: BucketType\n /** User-defined key-value metadata stored on the bucket. */\n readonly bucketInfo: Record<string, string>\n /** CORS rules configured on this bucket. */\n readonly corsRules: readonly CorsRule[]\n /** Default server-side encryption setting for new files in this bucket. */\n readonly defaultServerSideEncryption: EncryptionSetting\n /** File Lock configuration including authorization status and current settings. */\n readonly fileLockConfiguration: {\n /** Whether the caller is authorized to read file lock settings. */\n readonly isClientAuthorizedToRead: boolean\n /** File lock settings, or null if the caller lacks read authorization. */\n readonly value: {\n /** Whether Object Lock is enabled on this bucket. */\n readonly isFileLockEnabled: boolean\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n } | null\n }\n /** Lifecycle rules configured on this bucket. */\n readonly lifecycleRules: readonly LifecycleRule[]\n /** Set of options enabled on this bucket (e.g., `'s3'`). */\n readonly options: readonly string[]\n /** Monotonically increasing revision number, incremented on each bucket update. */\n readonly revision: number\n /** Default retention policy for newly uploaded files. */\n readonly defaultRetention: BucketRetentionPolicy\n /** Cross-region replication configuration for this bucket. */\n readonly replicationConfiguration: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_create_bucket` API call.\n */\nexport interface CreateBucketRequest {\n /** Account that will own the new bucket. */\n readonly accountId: AccountId\n /** Globally unique name for the bucket. */\n readonly bucketName: string\n /** Access level for the bucket. */\n readonly bucketType: BucketType\n /** Optional user-defined key-value metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Optional CORS rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Optional default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Optional default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock on the bucket. Cannot be changed after creation. */\n readonly fileLockEnabled?: boolean\n /** Optional lifecycle rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Optional replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n}\n\n/**\n * Request parameters for the `b2_update_bucket` API call.\n */\nexport interface UpdateBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to update. */\n readonly bucketId: BucketId\n /** New access level for the bucket. */\n readonly bucketType?: BucketType\n /** Updated user-defined key-value metadata. Replaces all existing metadata. */\n readonly bucketInfo?: Record<string, string>\n /** Updated CORS rules. Replaces all existing rules. */\n readonly corsRules?: readonly CorsRule[]\n /** Updated default server-side encryption setting. */\n readonly defaultServerSideEncryption?: EncryptionSetting\n /** Updated default Object Lock retention policy. */\n readonly defaultRetention?: BucketRetentionPolicy\n /** Whether to enable Object Lock. Can only transition from disabled to enabled. */\n readonly fileLockEnabled?: boolean\n /** Updated lifecycle rules. Replaces all existing rules. */\n readonly lifecycleRules?: readonly LifecycleRule[]\n /** Updated replication configuration. */\n readonly replicationConfiguration?: ReplicationConfiguration\n /** Optimistic locking: only update if the bucket's current revision matches this value. */\n readonly ifRevisionIs?: number\n}\n\n/**\n * Request parameters for the `b2_list_buckets` API call.\n */\nexport interface ListBucketsRequest {\n /** Account whose buckets to list. */\n readonly accountId: AccountId\n /** Optional filter to return only the bucket with this ID. */\n readonly bucketId?: BucketId\n /** Optional filter to return only the bucket with this name. */\n readonly bucketName?: string\n /** Optional filter to return only buckets of these types. */\n readonly bucketTypes?: readonly BucketType[]\n}\n\n/** Response from the `b2_list_buckets` API call. */\nexport interface ListBucketsResponse {\n /** Array of buckets matching the request filters. */\n readonly buckets: readonly BucketInfo[]\n}\n\n/**\n * Request parameters for the `b2_delete_bucket` API call.\n */\nexport interface DeleteBucketRequest {\n /** Account that owns the bucket. */\n readonly accountId: AccountId\n /** ID of the bucket to delete. The bucket must be empty. */\n readonly bucketId: BucketId\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,aAAa;;CAExB,WAAW;;CAEX,YAAY;;CAEZ,UAAU;;CAEV,YAAY;AACd;;;;;;;;;;;;;;;;;;AAkCA,IAAa,gBAAgB;;CAE3B,sBAAsB;;CAEtB,oBAAoB;;CAEpB,cAAc;;CAEd,cAAc;;CAEd,UAAU;;CAEV,OAAO;;CAEP,QAAQ;;CAER,QAAQ;;CAER,OAAO;AACT;;;;;;;AA8BA,IAAa,sBAAsB;;CAEjC,YAAY;;CAEZ,YAAY;;CAEZ,MAAM;AACR"}
@@ -0,0 +1,62 @@
1
+ //#region src/types/download.ts
2
+ /** HTTP response header names returned by B2 download endpoints. */
3
+ var DownloadHeaderName = {
4
+ /** Header carrying the response content disposition. */
5
+ ContentDisposition: "Content-Disposition",
6
+ /** Header carrying the response content language. */
7
+ ContentLanguage: "Content-Language",
8
+ /** Header carrying the response content encoding. */
9
+ ContentEncoding: "Content-Encoding",
10
+ /** Header carrying the response content type. */
11
+ ContentType: "Content-Type",
12
+ /** Header carrying the response cache policy. */
13
+ CacheControl: "Cache-Control",
14
+ /** Header carrying the response expiration time. */
15
+ Expires: "Expires",
16
+ /** Header carrying the byte range returned for partial downloads. */
17
+ ContentRange: "Content-Range",
18
+ /** Header carrying the response content length. */
19
+ ContentLength: "Content-Length",
20
+ /** Header carrying the B2 SHA-1 metadata value. */
21
+ ContentSha1: "X-Bz-Content-Sha1",
22
+ /** Header carrying the downloaded file version ID. */
23
+ FileId: "X-Bz-File-Id",
24
+ /** Header carrying the URL-encoded downloaded file name. */
25
+ FileName: "X-Bz-File-Name",
26
+ /** Header carrying the file upload timestamp. */
27
+ UploadTimestamp: "X-Bz-Upload-Timestamp",
28
+ /** Header carrying the B2-managed server-side encryption algorithm. */
29
+ ServerSideEncryption: "X-Bz-Server-Side-Encryption",
30
+ /** Header carrying the SSE-C algorithm echo. */
31
+ ServerSideEncryptionCustomerAlgorithm: "X-Bz-Server-Side-Encryption-Customer-Algorithm",
32
+ /** Header carrying the SSE-C customer-key MD5 echo. */
33
+ ServerSideEncryptionCustomerKeyMd5: "X-Bz-Server-Side-Encryption-Customer-Key-Md5",
34
+ /** Header carrying the Object Lock retention mode. */
35
+ FileRetentionMode: "X-Bz-File-Retention-Mode",
36
+ /** Header carrying the Object Lock retain-until timestamp. */
37
+ FileRetentionRetainUntilTimestamp: "X-Bz-File-Retention-Retain-Until-Timestamp",
38
+ /** Header carrying the Object Lock legal-hold value. */
39
+ FileLegalHold: "X-Bz-File-Legal-Hold",
40
+ /** Header carrying names of metadata headers hidden by missing capabilities. */
41
+ ClientUnauthorizedToRead: "X-Bz-Client-Unauthorized-To-Read"
42
+ };
43
+ /** Documented download metadata markers B2 may hide when the caller lacks read capabilities. */
44
+ var DownloadClientUnauthorizedToReadMarker = {
45
+ /** B2-managed encryption metadata is hidden. */
46
+ ServerSideEncryption: DownloadHeaderName.ServerSideEncryption,
47
+ /** SSE-C algorithm metadata is hidden. */
48
+ ServerSideEncryptionCustomerAlgorithm: DownloadHeaderName.ServerSideEncryptionCustomerAlgorithm,
49
+ /** SSE-C customer-key MD5 metadata is hidden. */
50
+ ServerSideEncryptionCustomerKeyMd5: DownloadHeaderName.ServerSideEncryptionCustomerKeyMd5,
51
+ /** Object Lock retention mode metadata is hidden. */
52
+ FileRetentionMode: DownloadHeaderName.FileRetentionMode,
53
+ /** Object Lock retain-until timestamp metadata is hidden. */
54
+ FileRetentionRetainUntilTimestamp: DownloadHeaderName.FileRetentionRetainUntilTimestamp,
55
+ /** Object Lock legal-hold metadata is hidden. */
56
+ FileLegalHold: DownloadHeaderName.FileLegalHold
57
+ };
58
+ //#endregion
59
+ exports.DownloadClientUnauthorizedToReadMarker = DownloadClientUnauthorizedToReadMarker;
60
+ exports.DownloadHeaderName = DownloadHeaderName;
61
+
62
+ //# sourceMappingURL=download.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.cjs","names":[],"sources":["../../src/types/download.ts"],"sourcesContent":["import type { SseB2Setting, SseCPublicSetting } from './encryption.ts'\nimport type { BucketId, FileId } from './ids.ts'\nimport type { ReadableFileRetention, ReadableLegalHold } from './lock.ts'\n\n/** HTTP response header names returned by B2 download endpoints. */\nexport const DownloadHeaderName = {\n /** Header carrying the response content disposition. */\n ContentDisposition: 'Content-Disposition',\n /** Header carrying the response content language. */\n ContentLanguage: 'Content-Language',\n /** Header carrying the response content encoding. */\n ContentEncoding: 'Content-Encoding',\n /** Header carrying the response content type. */\n ContentType: 'Content-Type',\n /** Header carrying the response cache policy. */\n CacheControl: 'Cache-Control',\n /** Header carrying the response expiration time. */\n Expires: 'Expires',\n /** Header carrying the byte range returned for partial downloads. */\n ContentRange: 'Content-Range',\n /** Header carrying the response content length. */\n ContentLength: 'Content-Length',\n /** Header carrying the B2 SHA-1 metadata value. */\n ContentSha1: 'X-Bz-Content-Sha1',\n /** Header carrying the downloaded file version ID. */\n FileId: 'X-Bz-File-Id',\n /** Header carrying the URL-encoded downloaded file name. */\n FileName: 'X-Bz-File-Name',\n /** Header carrying the file upload timestamp. */\n UploadTimestamp: 'X-Bz-Upload-Timestamp',\n /** Header carrying the B2-managed server-side encryption algorithm. */\n ServerSideEncryption: 'X-Bz-Server-Side-Encryption',\n /** Header carrying the SSE-C algorithm echo. */\n ServerSideEncryptionCustomerAlgorithm: 'X-Bz-Server-Side-Encryption-Customer-Algorithm',\n /** Header carrying the SSE-C customer-key MD5 echo. */\n ServerSideEncryptionCustomerKeyMd5: 'X-Bz-Server-Side-Encryption-Customer-Key-Md5',\n /** Header carrying the Object Lock retention mode. */\n FileRetentionMode: 'X-Bz-File-Retention-Mode',\n /** Header carrying the Object Lock retain-until timestamp. */\n FileRetentionRetainUntilTimestamp: 'X-Bz-File-Retention-Retain-Until-Timestamp',\n /** Header carrying the Object Lock legal-hold value. */\n FileLegalHold: 'X-Bz-File-Legal-Hold',\n /** Header carrying names of metadata headers hidden by missing capabilities. */\n ClientUnauthorizedToRead: 'X-Bz-Client-Unauthorized-To-Read',\n} as const\n\n/** HTTP response header name returned by B2 download endpoints. */\nexport type DownloadHeaderName = (typeof DownloadHeaderName)[keyof typeof DownloadHeaderName]\n\n/** Documented download metadata markers B2 may hide when the caller lacks read capabilities. */\nexport const DownloadClientUnauthorizedToReadMarker = {\n /** B2-managed encryption metadata is hidden. */\n ServerSideEncryption: DownloadHeaderName.ServerSideEncryption,\n /** SSE-C algorithm metadata is hidden. */\n ServerSideEncryptionCustomerAlgorithm: DownloadHeaderName.ServerSideEncryptionCustomerAlgorithm,\n /** SSE-C customer-key MD5 metadata is hidden. */\n ServerSideEncryptionCustomerKeyMd5: DownloadHeaderName.ServerSideEncryptionCustomerKeyMd5,\n /** Object Lock retention mode metadata is hidden. */\n FileRetentionMode: DownloadHeaderName.FileRetentionMode,\n /** Object Lock retain-until timestamp metadata is hidden. */\n FileRetentionRetainUntilTimestamp: DownloadHeaderName.FileRetentionRetainUntilTimestamp,\n /** Object Lock legal-hold metadata is hidden. */\n FileLegalHold: DownloadHeaderName.FileLegalHold,\n} as const\n\n/** Documented download metadata marker B2 may hide when the caller lacks read capabilities. */\nexport type DownloadClientUnauthorizedToReadMarker =\n (typeof DownloadClientUnauthorizedToReadMarker)[keyof typeof DownloadClientUnauthorizedToReadMarker]\n\n/** Request parameters for downloading a file by its ID via `b2_download_file_by_id`. */\nexport interface DownloadByIdRequest {\n /** ID of the file version to download. */\n readonly fileId: FileId\n /** Optional byte range to download (e.g., `'bytes=0-999'`). */\n readonly range?: string\n /** SSE-C decryption parameters, required if the file was uploaded with SSE-C. */\n readonly serverSideEncryption?: {\n /** Encryption algorithm. Always `'AES256'`. */\n readonly algorithm: 'AES256'\n /** Base64-encoded customer-provided decryption key. */\n readonly customerKey: string\n /** Base64-encoded MD5 digest of the decryption key. */\n readonly customerKeyMd5: string\n }\n /** Override the Content-Disposition header in the download response. */\n readonly b2ContentDisposition?: string\n /** Override the Content-Language header in the download response. */\n readonly b2ContentLanguage?: string\n /** Override the Content-Encoding header in the download response. */\n readonly b2ContentEncoding?: string\n /** Override the Content-Type header in the download response. */\n readonly b2ContentType?: string\n /** Override the Cache-Control header in the download response. */\n readonly b2CacheControl?: string\n /** Override the Expires header in the download response. */\n readonly b2Expires?: string\n}\n\n/** Request parameters for downloading a file by bucket name and file name via `b2_download_file_by_name`. */\nexport interface DownloadByNameRequest {\n /** Name of the bucket containing the file. */\n readonly bucketName: string\n /** Full path and name of the file within the bucket. */\n readonly fileName: string\n /** Optional byte range to download (e.g., `'bytes=0-999'`). */\n readonly range?: string\n /** SSE-C decryption parameters, required if the file was uploaded with SSE-C. */\n readonly serverSideEncryption?: {\n /** Encryption algorithm. Always `'AES256'`. */\n readonly algorithm: 'AES256'\n /** Base64-encoded customer-provided decryption key. */\n readonly customerKey: string\n /** Base64-encoded MD5 digest of the decryption key. */\n readonly customerKeyMd5: string\n }\n /** Override the Content-Disposition header in the download response. */\n readonly b2ContentDisposition?: string\n /** Override the Content-Language header in the download response. */\n readonly b2ContentLanguage?: string\n /** Override the Content-Encoding header in the download response. */\n readonly b2ContentEncoding?: string\n /** Override the Content-Type header in the download response. */\n readonly b2ContentType?: string\n /** Override the Cache-Control header in the download response. */\n readonly b2CacheControl?: string\n /** Override the Expires header in the download response. */\n readonly b2Expires?: string\n}\n\n/**\n * Request parameters for the `b2_get_download_authorization` API call.\n * Creates a time-limited token that authorizes downloads of files matching a prefix.\n */\nexport interface DownloadAuthorizationRequest {\n /** Bucket to authorize downloads from. */\n readonly bucketId: BucketId\n /** Only files with names starting with this prefix are authorized. */\n readonly fileNamePrefix: string\n /** Duration in seconds that the authorization token remains valid. */\n readonly validDurationInSeconds: number\n /** Override the Content-Disposition header in authorized download responses. */\n readonly b2ContentDisposition?: string\n /** Override the Content-Language header in authorized download responses. */\n readonly b2ContentLanguage?: string\n /** Override the Content-Encoding header in authorized download responses. */\n readonly b2ContentEncoding?: string\n /** Override the Content-Type header in authorized download responses. */\n readonly b2ContentType?: string\n /** Override the Cache-Control header in authorized download responses. */\n readonly b2CacheControl?: string\n /** Override the Expires header in authorized download responses. */\n readonly b2Expires?: string\n}\n\n/** Response from the `b2_get_download_authorization` API call. */\nexport interface DownloadAuthorizationResponse {\n /** Bucket the authorization applies to. */\n readonly bucketId: BucketId\n /** File name prefix the authorization is scoped to. */\n readonly fileNamePrefix: string\n /** Authorization token to include in download requests. */\n readonly authorizationToken: string\n}\n\n/** Customer-managed server-side encryption metadata echoed in B2 download response headers. */\nexport interface SseCDownloadSetting extends SseCPublicSetting {\n /** MD5 digest echoed by `X-Bz-Server-Side-Encryption-Customer-Key-Md5`. */\n readonly customerKeyMd5: string\n}\n\n/** Server-side encryption metadata echoed in B2 download response headers. */\nexport type DownloadServerSideEncryption = SseB2Setting | SseCDownloadSetting\n\n/** Diagnostic for a present download metadata header the SDK could not parse narrowly. */\nexport interface DownloadHeaderParseIssue {\n /** Header whose value could not be parsed into the current typed SDK model. */\n readonly headerName: DownloadHeaderName\n /** Raw header value that could not be parsed. */\n readonly value: string\n}\n\n/** Parsed headers from a B2 file download response. */\nexport interface DownloadHeaders {\n /** MIME type of the downloaded file content. */\n readonly contentType: string\n /** Size of the downloaded content in bytes. */\n readonly contentLength: number\n /** Content-Disposition value computed from upload metadata or the download request. */\n readonly contentDisposition?: string\n /** Content-Language value computed from upload metadata or the download request. */\n readonly contentLanguage?: string\n /** Content-Encoding value computed from upload metadata or the download request. */\n readonly contentEncoding?: string\n /** Cache-Control value computed from upload metadata, bucket defaults, or the download request. */\n readonly cacheControl?: string\n /** Expires value computed from upload metadata or the download request. */\n readonly expires?: string\n /** Content-Range value returned for satisfiable range downloads. */\n readonly contentRange?: string\n /** SHA-1 checksum of the full file content, or null for large files. */\n readonly contentSha1: string | null\n /** ID of the downloaded file version. */\n readonly fileId: FileId\n /** Full path and name of the downloaded file. */\n readonly fileName: string\n /** User-defined key-value metadata stored with the file. */\n readonly fileInfo: Record<string, string>\n /** UTC timestamp (milliseconds) when the file was uploaded. */\n readonly uploadTimestamp: number\n /** Server-side encryption metadata echoed by B2, when the caller is authorized to read it. */\n readonly serverSideEncryption?: DownloadServerSideEncryption\n /** Object Lock retention metadata, including whether the caller may read it. */\n readonly fileRetention?: ReadableFileRetention\n /** Object Lock legal hold metadata, including whether the caller may read it. */\n readonly legalHold?: ReadableLegalHold\n /** Header names B2 omitted because the caller lacks capability to read them. */\n readonly clientUnauthorizedToRead?: readonly DownloadClientUnauthorizedToReadMarker[]\n /** Present metadata headers the SDK could not parse into its current narrow typed model. */\n readonly headerParseIssues?: readonly DownloadHeaderParseIssue[]\n}\n"],"mappings":";;AAKA,IAAa,qBAAqB;;CAEhC,oBAAoB;;CAEpB,iBAAiB;;CAEjB,iBAAiB;;CAEjB,aAAa;;CAEb,cAAc;;CAEd,SAAS;;CAET,cAAc;;CAEd,eAAe;;CAEf,aAAa;;CAEb,QAAQ;;CAER,UAAU;;CAEV,iBAAiB;;CAEjB,sBAAsB;;CAEtB,uCAAuC;;CAEvC,oCAAoC;;CAEpC,mBAAmB;;CAEnB,mCAAmC;;CAEnC,eAAe;;CAEf,0BAA0B;AAC5B;;AAMA,IAAa,yCAAyC;;CAEpD,sBAAsB,mBAAmB;;CAEzC,uCAAuC,mBAAmB;;CAE1D,oCAAoC,mBAAmB;;CAEvD,mBAAmB,mBAAmB;;CAEtC,mCAAmC,mBAAmB;;CAEtD,eAAe,mBAAmB;AACpC"}
@@ -1,4 +1,66 @@
1
+ import { SseB2Setting, SseCPublicSetting } from './encryption.js';
1
2
  import { BucketId, FileId } from './ids.js';
3
+ import { ReadableFileRetention, ReadableLegalHold } from './lock.js';
4
+ /** HTTP response header names returned by B2 download endpoints. */
5
+ export declare const DownloadHeaderName: {
6
+ /** Header carrying the response content disposition. */
7
+ readonly ContentDisposition: "Content-Disposition";
8
+ /** Header carrying the response content language. */
9
+ readonly ContentLanguage: "Content-Language";
10
+ /** Header carrying the response content encoding. */
11
+ readonly ContentEncoding: "Content-Encoding";
12
+ /** Header carrying the response content type. */
13
+ readonly ContentType: "Content-Type";
14
+ /** Header carrying the response cache policy. */
15
+ readonly CacheControl: "Cache-Control";
16
+ /** Header carrying the response expiration time. */
17
+ readonly Expires: "Expires";
18
+ /** Header carrying the byte range returned for partial downloads. */
19
+ readonly ContentRange: "Content-Range";
20
+ /** Header carrying the response content length. */
21
+ readonly ContentLength: "Content-Length";
22
+ /** Header carrying the B2 SHA-1 metadata value. */
23
+ readonly ContentSha1: "X-Bz-Content-Sha1";
24
+ /** Header carrying the downloaded file version ID. */
25
+ readonly FileId: "X-Bz-File-Id";
26
+ /** Header carrying the URL-encoded downloaded file name. */
27
+ readonly FileName: "X-Bz-File-Name";
28
+ /** Header carrying the file upload timestamp. */
29
+ readonly UploadTimestamp: "X-Bz-Upload-Timestamp";
30
+ /** Header carrying the B2-managed server-side encryption algorithm. */
31
+ readonly ServerSideEncryption: "X-Bz-Server-Side-Encryption";
32
+ /** Header carrying the SSE-C algorithm echo. */
33
+ readonly ServerSideEncryptionCustomerAlgorithm: "X-Bz-Server-Side-Encryption-Customer-Algorithm";
34
+ /** Header carrying the SSE-C customer-key MD5 echo. */
35
+ readonly ServerSideEncryptionCustomerKeyMd5: "X-Bz-Server-Side-Encryption-Customer-Key-Md5";
36
+ /** Header carrying the Object Lock retention mode. */
37
+ readonly FileRetentionMode: "X-Bz-File-Retention-Mode";
38
+ /** Header carrying the Object Lock retain-until timestamp. */
39
+ readonly FileRetentionRetainUntilTimestamp: "X-Bz-File-Retention-Retain-Until-Timestamp";
40
+ /** Header carrying the Object Lock legal-hold value. */
41
+ readonly FileLegalHold: "X-Bz-File-Legal-Hold";
42
+ /** Header carrying names of metadata headers hidden by missing capabilities. */
43
+ readonly ClientUnauthorizedToRead: "X-Bz-Client-Unauthorized-To-Read";
44
+ };
45
+ /** HTTP response header name returned by B2 download endpoints. */
46
+ export type DownloadHeaderName = (typeof DownloadHeaderName)[keyof typeof DownloadHeaderName];
47
+ /** Documented download metadata markers B2 may hide when the caller lacks read capabilities. */
48
+ export declare const DownloadClientUnauthorizedToReadMarker: {
49
+ /** B2-managed encryption metadata is hidden. */
50
+ readonly ServerSideEncryption: "X-Bz-Server-Side-Encryption";
51
+ /** SSE-C algorithm metadata is hidden. */
52
+ readonly ServerSideEncryptionCustomerAlgorithm: "X-Bz-Server-Side-Encryption-Customer-Algorithm";
53
+ /** SSE-C customer-key MD5 metadata is hidden. */
54
+ readonly ServerSideEncryptionCustomerKeyMd5: "X-Bz-Server-Side-Encryption-Customer-Key-Md5";
55
+ /** Object Lock retention mode metadata is hidden. */
56
+ readonly FileRetentionMode: "X-Bz-File-Retention-Mode";
57
+ /** Object Lock retain-until timestamp metadata is hidden. */
58
+ readonly FileRetentionRetainUntilTimestamp: "X-Bz-File-Retention-Retain-Until-Timestamp";
59
+ /** Object Lock legal-hold metadata is hidden. */
60
+ readonly FileLegalHold: "X-Bz-File-Legal-Hold";
61
+ };
62
+ /** Documented download metadata marker B2 may hide when the caller lacks read capabilities. */
63
+ export type DownloadClientUnauthorizedToReadMarker = (typeof DownloadClientUnauthorizedToReadMarker)[keyof typeof DownloadClientUnauthorizedToReadMarker];
2
64
  /** Request parameters for downloading a file by its ID via `b2_download_file_by_id`. */
3
65
  export interface DownloadByIdRequest {
4
66
  /** ID of the file version to download. */
@@ -90,12 +152,38 @@ export interface DownloadAuthorizationResponse {
90
152
  /** Authorization token to include in download requests. */
91
153
  readonly authorizationToken: string;
92
154
  }
155
+ /** Customer-managed server-side encryption metadata echoed in B2 download response headers. */
156
+ export interface SseCDownloadSetting extends SseCPublicSetting {
157
+ /** MD5 digest echoed by `X-Bz-Server-Side-Encryption-Customer-Key-Md5`. */
158
+ readonly customerKeyMd5: string;
159
+ }
160
+ /** Server-side encryption metadata echoed in B2 download response headers. */
161
+ export type DownloadServerSideEncryption = SseB2Setting | SseCDownloadSetting;
162
+ /** Diagnostic for a present download metadata header the SDK could not parse narrowly. */
163
+ export interface DownloadHeaderParseIssue {
164
+ /** Header whose value could not be parsed into the current typed SDK model. */
165
+ readonly headerName: DownloadHeaderName;
166
+ /** Raw header value that could not be parsed. */
167
+ readonly value: string;
168
+ }
93
169
  /** Parsed headers from a B2 file download response. */
94
170
  export interface DownloadHeaders {
95
171
  /** MIME type of the downloaded file content. */
96
172
  readonly contentType: string;
97
173
  /** Size of the downloaded content in bytes. */
98
174
  readonly contentLength: number;
175
+ /** Content-Disposition value computed from upload metadata or the download request. */
176
+ readonly contentDisposition?: string;
177
+ /** Content-Language value computed from upload metadata or the download request. */
178
+ readonly contentLanguage?: string;
179
+ /** Content-Encoding value computed from upload metadata or the download request. */
180
+ readonly contentEncoding?: string;
181
+ /** Cache-Control value computed from upload metadata, bucket defaults, or the download request. */
182
+ readonly cacheControl?: string;
183
+ /** Expires value computed from upload metadata or the download request. */
184
+ readonly expires?: string;
185
+ /** Content-Range value returned for satisfiable range downloads. */
186
+ readonly contentRange?: string;
99
187
  /** SHA-1 checksum of the full file content, or null for large files. */
100
188
  readonly contentSha1: string | null;
101
189
  /** ID of the downloaded file version. */
@@ -106,5 +194,15 @@ export interface DownloadHeaders {
106
194
  readonly fileInfo: Record<string, string>;
107
195
  /** UTC timestamp (milliseconds) when the file was uploaded. */
108
196
  readonly uploadTimestamp: number;
197
+ /** Server-side encryption metadata echoed by B2, when the caller is authorized to read it. */
198
+ readonly serverSideEncryption?: DownloadServerSideEncryption;
199
+ /** Object Lock retention metadata, including whether the caller may read it. */
200
+ readonly fileRetention?: ReadableFileRetention;
201
+ /** Object Lock legal hold metadata, including whether the caller may read it. */
202
+ readonly legalHold?: ReadableLegalHold;
203
+ /** Header names B2 omitted because the caller lacks capability to read them. */
204
+ readonly clientUnauthorizedToRead?: readonly DownloadClientUnauthorizedToReadMarker[];
205
+ /** Present metadata headers the SDK could not parse into its current narrow typed model. */
206
+ readonly headerParseIssues?: readonly DownloadHeaderParseIssue[];
109
207
  }
110
208
  //# sourceMappingURL=download.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/types/download.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEhD,wFAAwF;AACxF,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,iFAAiF;IACjF,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QAC9B,+CAA+C;QAC/C,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAA;QAC5B,uDAAuD;QACvD,Q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