@backblaze-labs/b2-sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (590) hide show
  1. package/CHANGELOG.md +86 -1
  2. package/README.md +38 -7
  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/auth/reauth-coalescer.cjs +65 -0
  7. package/dist/auth/reauth-coalescer.cjs.map +1 -0
  8. package/dist/auth/reauth-coalescer.d.cts +34 -0
  9. package/dist/auth/reauth-coalescer.d.cts.map +1 -0
  10. package/dist/auth/reauth-coalescer.d.ts +34 -0
  11. package/dist/auth/reauth-coalescer.d.ts.map +1 -0
  12. package/dist/auth/reauth-coalescer.js +65 -0
  13. package/dist/auth/reauth-coalescer.js.map +1 -0
  14. package/dist/backup/client.cjs +206 -0
  15. package/dist/backup/client.cjs.map +1 -0
  16. package/dist/backup/client.d.cts +238 -0
  17. package/dist/backup/client.d.cts.map +1 -0
  18. package/dist/backup/client.d.ts +238 -0
  19. package/dist/backup/client.d.ts.map +1 -0
  20. package/dist/backup/client.js +206 -0
  21. package/dist/backup/client.js.map +1 -0
  22. package/dist/backup/index.cjs +15 -0
  23. package/dist/backup/index.d.cts +22 -0
  24. package/dist/backup/index.d.cts.map +1 -0
  25. package/dist/backup/index.d.ts +22 -0
  26. package/dist/backup/index.d.ts.map +1 -0
  27. package/dist/backup/index.js +7 -0
  28. package/dist/backup/raw.cjs +168 -0
  29. package/dist/backup/raw.cjs.map +1 -0
  30. package/dist/backup/raw.d.cts +122 -0
  31. package/dist/backup/raw.d.cts.map +1 -0
  32. package/dist/backup/raw.d.ts +122 -0
  33. package/dist/backup/raw.d.ts.map +1 -0
  34. package/dist/backup/raw.js +168 -0
  35. package/dist/backup/raw.js.map +1 -0
  36. package/dist/bucket-validation.cjs +111 -0
  37. package/dist/bucket-validation.cjs.map +1 -0
  38. package/dist/bucket-validation.d.cts +27 -0
  39. package/dist/bucket-validation.d.cts.map +1 -0
  40. package/dist/bucket-validation.d.ts +27 -0
  41. package/dist/bucket-validation.d.ts.map +1 -0
  42. package/dist/bucket-validation.js +109 -0
  43. package/dist/bucket-validation.js.map +1 -0
  44. package/dist/bucket.cjs +125 -74
  45. package/dist/bucket.cjs.map +1 -1
  46. package/dist/bucket.d.cts +156 -61
  47. package/dist/bucket.d.cts.map +1 -1
  48. package/dist/bucket.d.ts +156 -61
  49. package/dist/bucket.d.ts.map +1 -1
  50. package/dist/bucket.js +125 -74
  51. package/dist/bucket.js.map +1 -1
  52. package/dist/client.cjs +29 -8
  53. package/dist/client.cjs.map +1 -1
  54. package/dist/client.d.cts +30 -9
  55. package/dist/client.d.cts.map +1 -1
  56. package/dist/client.d.ts +30 -9
  57. package/dist/client.d.ts.map +1 -1
  58. package/dist/client.js +29 -8
  59. package/dist/client.js.map +1 -1
  60. package/dist/copy/large.cjs +5 -3
  61. package/dist/copy/large.cjs.map +1 -1
  62. package/dist/copy/large.d.cts.map +1 -1
  63. package/dist/copy/large.d.ts.map +1 -1
  64. package/dist/copy/large.js +5 -3
  65. package/dist/copy/large.js.map +1 -1
  66. package/dist/download/checksum.cjs +6 -2
  67. package/dist/download/checksum.cjs.map +1 -1
  68. package/dist/download/checksum.js +6 -2
  69. package/dist/download/checksum.js.map +1 -1
  70. package/dist/download/parallel.cjs +52 -15
  71. package/dist/download/parallel.cjs.map +1 -1
  72. package/dist/download/parallel.d.cts +8 -1
  73. package/dist/download/parallel.d.cts.map +1 -1
  74. package/dist/download/parallel.d.ts +8 -1
  75. package/dist/download/parallel.d.ts.map +1 -1
  76. package/dist/download/parallel.js +52 -15
  77. package/dist/download/parallel.js.map +1 -1
  78. package/dist/download/single.cjs +179 -19
  79. package/dist/download/single.cjs.map +1 -1
  80. package/dist/download/single.d.cts +10 -4
  81. package/dist/download/single.d.cts.map +1 -1
  82. package/dist/download/single.d.ts +10 -4
  83. package/dist/download/single.d.ts.map +1 -1
  84. package/dist/download/single.js +179 -19
  85. package/dist/download/single.js.map +1 -1
  86. package/dist/errors/index.cjs +196 -3
  87. package/dist/errors/index.cjs.map +1 -1
  88. package/dist/errors/index.d.cts +134 -0
  89. package/dist/errors/index.d.cts.map +1 -1
  90. package/dist/errors/index.d.ts +134 -0
  91. package/dist/errors/index.d.ts.map +1 -1
  92. package/dist/errors/index.js +183 -4
  93. package/dist/errors/index.js.map +1 -1
  94. package/dist/http/non-idempotent-mutations.cjs +38 -0
  95. package/dist/http/non-idempotent-mutations.cjs.map +1 -0
  96. package/dist/http/non-idempotent-mutations.d.cts +25 -0
  97. package/dist/http/non-idempotent-mutations.d.cts.map +1 -0
  98. package/dist/http/non-idempotent-mutations.d.ts +25 -0
  99. package/dist/http/non-idempotent-mutations.d.ts.map +1 -0
  100. package/dist/http/non-idempotent-mutations.js +35 -0
  101. package/dist/http/non-idempotent-mutations.js.map +1 -0
  102. package/dist/http/retry.cjs +1 -1
  103. package/dist/http/retry.cjs.map +1 -1
  104. package/dist/http/retry.js +1 -1
  105. package/dist/http/retry.js.map +1 -1
  106. package/dist/http/transport.cjs +62 -23
  107. package/dist/http/transport.cjs.map +1 -1
  108. package/dist/http/transport.d.cts +30 -3
  109. package/dist/http/transport.d.cts.map +1 -1
  110. package/dist/http/transport.d.ts +30 -3
  111. package/dist/http/transport.d.ts.map +1 -1
  112. package/dist/http/transport.js +60 -22
  113. package/dist/http/transport.js.map +1 -1
  114. package/dist/http/user-agent.cjs +12 -1
  115. package/dist/http/user-agent.cjs.map +1 -1
  116. package/dist/http/user-agent.d.cts +8 -0
  117. package/dist/http/user-agent.d.cts.map +1 -1
  118. package/dist/http/user-agent.d.ts +8 -0
  119. package/dist/http/user-agent.d.ts.map +1 -1
  120. package/dist/http/user-agent.js +13 -3
  121. package/dist/http/user-agent.js.map +1 -1
  122. package/dist/index.cjs +50 -2
  123. package/dist/index.d.cts +15 -12
  124. package/dist/index.d.cts.map +1 -1
  125. package/dist/index.d.ts +15 -12
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +13 -10
  128. package/dist/notifications/index.cjs +3 -0
  129. package/dist/notifications/index.d.cts +2 -0
  130. package/dist/notifications/index.d.cts.map +1 -1
  131. package/dist/notifications/index.d.ts +2 -0
  132. package/dist/notifications/index.d.ts.map +1 -1
  133. package/dist/notifications/index.js +2 -1
  134. package/dist/object.cjs +13 -2
  135. package/dist/object.cjs.map +1 -1
  136. package/dist/object.d.cts +11 -3
  137. package/dist/object.d.cts.map +1 -1
  138. package/dist/object.d.ts +11 -3
  139. package/dist/object.d.ts.map +1 -1
  140. package/dist/object.js +13 -2
  141. package/dist/object.js.map +1 -1
  142. package/dist/partner/account-info.d.cts +43 -0
  143. package/dist/partner/account-info.d.cts.map +1 -0
  144. package/dist/partner/account-info.d.ts +43 -0
  145. package/dist/partner/account-info.d.ts.map +1 -0
  146. package/dist/partner/auth-clone.cjs +64 -0
  147. package/dist/partner/auth-clone.cjs.map +1 -0
  148. package/dist/partner/auth-clone.d.cts +27 -0
  149. package/dist/partner/auth-clone.d.cts.map +1 -0
  150. package/dist/partner/auth-clone.d.ts +27 -0
  151. package/dist/partner/auth-clone.d.ts.map +1 -0
  152. package/dist/partner/auth-clone.js +63 -0
  153. package/dist/partner/auth-clone.js.map +1 -0
  154. package/dist/partner/auth-core.cjs +156 -0
  155. package/dist/partner/auth-core.cjs.map +1 -0
  156. package/dist/partner/auth-core.d.cts +111 -0
  157. package/dist/partner/auth-core.d.cts.map +1 -0
  158. package/dist/partner/auth-core.d.ts +111 -0
  159. package/dist/partner/auth-core.d.ts.map +1 -0
  160. package/dist/partner/auth-core.js +156 -0
  161. package/dist/partner/auth-core.js.map +1 -0
  162. package/dist/partner/auth-shape.cjs +36 -0
  163. package/dist/partner/auth-shape.cjs.map +1 -0
  164. package/dist/partner/auth-shape.d.cts +12 -0
  165. package/dist/partner/auth-shape.d.cts.map +1 -0
  166. package/dist/partner/auth-shape.d.ts +12 -0
  167. package/dist/partner/auth-shape.d.ts.map +1 -0
  168. package/dist/partner/auth-shape.js +36 -0
  169. package/dist/partner/auth-shape.js.map +1 -0
  170. package/dist/partner/client.cjs +270 -0
  171. package/dist/partner/client.cjs.map +1 -0
  172. package/dist/partner/client.d.cts +357 -0
  173. package/dist/partner/client.d.cts.map +1 -0
  174. package/dist/partner/client.d.ts +357 -0
  175. package/dist/partner/client.d.ts.map +1 -0
  176. package/dist/partner/client.js +270 -0
  177. package/dist/partner/client.js.map +1 -0
  178. package/dist/partner/endpoint-url.cjs +109 -0
  179. package/dist/partner/endpoint-url.cjs.map +1 -0
  180. package/dist/partner/endpoint-url.d.cts +74 -0
  181. package/dist/partner/endpoint-url.d.cts.map +1 -0
  182. package/dist/partner/endpoint-url.d.ts +74 -0
  183. package/dist/partner/endpoint-url.d.ts.map +1 -0
  184. package/dist/partner/endpoint-url.js +106 -0
  185. package/dist/partner/endpoint-url.js.map +1 -0
  186. package/dist/partner/in-memory.cjs +135 -0
  187. package/dist/partner/in-memory.cjs.map +1 -0
  188. package/dist/partner/in-memory.d.cts +99 -0
  189. package/dist/partner/in-memory.d.cts.map +1 -0
  190. package/dist/partner/in-memory.d.ts +99 -0
  191. package/dist/partner/in-memory.d.ts.map +1 -0
  192. package/dist/partner/in-memory.js +135 -0
  193. package/dist/partner/in-memory.js.map +1 -0
  194. package/dist/partner/index.cjs +27 -0
  195. package/dist/partner/index.d.cts +32 -0
  196. package/dist/partner/index.d.cts.map +1 -0
  197. package/dist/partner/index.d.ts +32 -0
  198. package/dist/partner/index.d.ts.map +1 -0
  199. package/dist/partner/index.js +9 -0
  200. package/dist/partner/raw.cjs +400 -0
  201. package/dist/partner/raw.cjs.map +1 -0
  202. package/dist/partner/raw.d.cts +220 -0
  203. package/dist/partner/raw.d.cts.map +1 -0
  204. package/dist/partner/raw.d.ts +220 -0
  205. package/dist/partner/raw.d.ts.map +1 -0
  206. package/dist/partner/raw.js +398 -0
  207. package/dist/partner/raw.js.map +1 -0
  208. package/dist/partner/redaction-placeholders.cjs +10 -0
  209. package/dist/partner/redaction-placeholders.cjs.map +1 -0
  210. package/dist/partner/redaction-placeholders.d.cts +5 -0
  211. package/dist/partner/redaction-placeholders.d.cts.map +1 -0
  212. package/dist/partner/redaction-placeholders.d.ts +5 -0
  213. package/dist/partner/redaction-placeholders.d.ts.map +1 -0
  214. package/dist/partner/redaction-placeholders.js +9 -0
  215. package/dist/partner/redaction-placeholders.js.map +1 -0
  216. package/dist/partner/redaction.cjs +292 -0
  217. package/dist/partner/redaction.cjs.map +1 -0
  218. package/dist/partner/redaction.d.cts +158 -0
  219. package/dist/partner/redaction.d.cts.map +1 -0
  220. package/dist/partner/redaction.d.ts +158 -0
  221. package/dist/partner/redaction.d.ts.map +1 -0
  222. package/dist/partner/redaction.js +281 -0
  223. package/dist/partner/redaction.js.map +1 -0
  224. package/dist/raw/encoding.cjs +29 -10
  225. package/dist/raw/encoding.cjs.map +1 -1
  226. package/dist/raw/encoding.d.cts +3 -2
  227. package/dist/raw/encoding.d.cts.map +1 -1
  228. package/dist/raw/encoding.d.ts +3 -2
  229. package/dist/raw/encoding.d.ts.map +1 -1
  230. package/dist/raw/encoding.js +29 -10
  231. package/dist/raw/encoding.js.map +1 -1
  232. package/dist/raw/index.cjs +131 -44
  233. package/dist/raw/index.cjs.map +1 -1
  234. package/dist/raw/index.d.cts +21 -15
  235. package/dist/raw/index.d.cts.map +1 -1
  236. package/dist/raw/index.d.ts +21 -15
  237. package/dist/raw/index.d.ts.map +1 -1
  238. package/dist/raw/index.js +114 -45
  239. package/dist/raw/index.js.map +1 -1
  240. package/dist/raw/url.cjs +111 -0
  241. package/dist/raw/url.cjs.map +1 -0
  242. package/dist/raw/url.d.cts +41 -0
  243. package/dist/raw/url.d.cts.map +1 -0
  244. package/dist/raw/url.d.ts +41 -0
  245. package/dist/raw/url.d.ts.map +1 -0
  246. package/dist/raw/url.js +110 -0
  247. package/dist/raw/url.js.map +1 -0
  248. package/dist/s3/sigv4.cjs +15 -10
  249. package/dist/s3/sigv4.cjs.map +1 -1
  250. package/dist/s3/sigv4.js +15 -10
  251. package/dist/s3/sigv4.js.map +1 -1
  252. package/dist/simulator/index.cjs +1579 -257
  253. package/dist/simulator/index.cjs.map +1 -1
  254. package/dist/simulator/index.d.cts +124 -11
  255. package/dist/simulator/index.d.cts.map +1 -1
  256. package/dist/simulator/index.d.ts +124 -11
  257. package/dist/simulator/index.d.ts.map +1 -1
  258. package/dist/simulator/index.js +1568 -262
  259. package/dist/simulator/index.js.map +1 -1
  260. package/dist/simulator/partner-capabilities.cjs +77 -0
  261. package/dist/simulator/partner-capabilities.cjs.map +1 -0
  262. package/dist/simulator/partner-capabilities.d.cts +53 -0
  263. package/dist/simulator/partner-capabilities.d.cts.map +1 -0
  264. package/dist/simulator/partner-capabilities.d.ts +53 -0
  265. package/dist/simulator/partner-capabilities.d.ts.map +1 -0
  266. package/dist/simulator/partner-capabilities.js +73 -0
  267. package/dist/simulator/partner-capabilities.js.map +1 -0
  268. package/dist/simulator/partner.cjs +713 -0
  269. package/dist/simulator/partner.cjs.map +1 -0
  270. package/dist/simulator/partner.d.cts +186 -0
  271. package/dist/simulator/partner.d.cts.map +1 -0
  272. package/dist/simulator/partner.d.ts +186 -0
  273. package/dist/simulator/partner.d.ts.map +1 -0
  274. package/dist/simulator/partner.js +713 -0
  275. package/dist/simulator/partner.js.map +1 -0
  276. package/dist/simulator/validation.cjs +732 -25
  277. package/dist/simulator/validation.cjs.map +1 -1
  278. package/dist/simulator/validation.d.cts +145 -6
  279. package/dist/simulator/validation.d.cts.map +1 -1
  280. package/dist/simulator/validation.d.ts +145 -6
  281. package/dist/simulator/validation.d.ts.map +1 -1
  282. package/dist/simulator/validation.js +705 -26
  283. package/dist/simulator/validation.js.map +1 -1
  284. package/dist/streams/file-source.cjs +2 -2
  285. package/dist/streams/file-source.cjs.map +1 -1
  286. package/dist/streams/file-source.js +2 -2
  287. package/dist/streams/file-source.js.map +1 -1
  288. package/dist/streams/hash.cjs +246 -13
  289. package/dist/streams/hash.cjs.map +1 -1
  290. package/dist/streams/hash.d.cts +37 -12
  291. package/dist/streams/hash.d.cts.map +1 -1
  292. package/dist/streams/hash.d.ts +37 -12
  293. package/dist/streams/hash.d.ts.map +1 -1
  294. package/dist/streams/hash.js +246 -15
  295. package/dist/streams/hash.js.map +1 -1
  296. package/dist/streams/index.cjs +3 -1
  297. package/dist/streams/index.d.cts +1 -1
  298. package/dist/streams/index.d.cts.map +1 -1
  299. package/dist/streams/index.d.ts +1 -1
  300. package/dist/streams/index.d.ts.map +1 -1
  301. package/dist/streams/index.js +3 -3
  302. package/dist/streams/progress.cjs +63 -4
  303. package/dist/streams/progress.cjs.map +1 -1
  304. package/dist/streams/progress.d.cts +28 -2
  305. package/dist/streams/progress.d.cts.map +1 -1
  306. package/dist/streams/progress.d.ts +28 -2
  307. package/dist/streams/progress.d.ts.map +1 -1
  308. package/dist/streams/progress.js +63 -4
  309. package/dist/streams/progress.js.map +1 -1
  310. package/dist/streams/source.cjs +2 -1
  311. package/dist/streams/source.cjs.map +1 -1
  312. package/dist/streams/source.js +2 -1
  313. package/dist/streams/source.js.map +1 -1
  314. package/dist/sync/b2-sha1-reader.cjs +6 -2
  315. package/dist/sync/b2-sha1-reader.cjs.map +1 -1
  316. package/dist/sync/b2-sha1-reader.d.cts.map +1 -1
  317. package/dist/sync/b2-sha1-reader.d.ts.map +1 -1
  318. package/dist/sync/b2-sha1-reader.js +6 -2
  319. package/dist/sync/b2-sha1-reader.js.map +1 -1
  320. package/dist/sync/download-staging.cjs +156 -43
  321. package/dist/sync/download-staging.cjs.map +1 -1
  322. package/dist/sync/download-staging.d.cts +26 -2
  323. package/dist/sync/download-staging.d.cts.map +1 -1
  324. package/dist/sync/download-staging.d.ts +26 -2
  325. package/dist/sync/download-staging.d.ts.map +1 -1
  326. package/dist/sync/download-staging.js +155 -44
  327. package/dist/sync/download-staging.js.map +1 -1
  328. package/dist/sync/filters.cjs.map +1 -1
  329. package/dist/sync/filters.js.map +1 -1
  330. package/dist/sync/index.d.cts +1 -1
  331. package/dist/sync/index.d.cts.map +1 -1
  332. package/dist/sync/index.d.ts +1 -1
  333. package/dist/sync/index.d.ts.map +1 -1
  334. package/dist/sync/local-file-io.cjs +15 -6
  335. package/dist/sync/local-file-io.cjs.map +1 -1
  336. package/dist/sync/local-file-io.d.cts +3 -0
  337. package/dist/sync/local-file-io.d.cts.map +1 -1
  338. package/dist/sync/local-file-io.d.ts +3 -0
  339. package/dist/sync/local-file-io.d.ts.map +1 -1
  340. package/dist/sync/local-file-io.js +15 -6
  341. package/dist/sync/local-file-io.js.map +1 -1
  342. package/dist/sync/local-sha1.cjs +6 -15
  343. package/dist/sync/local-sha1.cjs.map +1 -1
  344. package/dist/sync/local-sha1.d.cts +0 -8
  345. package/dist/sync/local-sha1.d.cts.map +1 -1
  346. package/dist/sync/local-sha1.d.ts +0 -8
  347. package/dist/sync/local-sha1.d.ts.map +1 -1
  348. package/dist/sync/local-sha1.js +7 -15
  349. package/dist/sync/local-sha1.js.map +1 -1
  350. package/dist/sync/pairing.cjs +1 -0
  351. package/dist/sync/pairing.cjs.map +1 -1
  352. package/dist/sync/pairing.js +1 -0
  353. package/dist/sync/pairing.js.map +1 -1
  354. package/dist/sync/policies/compare.cjs +5 -3
  355. package/dist/sync/policies/compare.cjs.map +1 -1
  356. package/dist/sync/policies/compare.d.cts.map +1 -1
  357. package/dist/sync/policies/compare.d.ts.map +1 -1
  358. package/dist/sync/policies/compare.js +6 -4
  359. package/dist/sync/policies/compare.js.map +1 -1
  360. package/dist/sync/policies/index.cjs +4 -10
  361. package/dist/sync/policies/index.cjs.map +1 -1
  362. package/dist/sync/policies/index.js +4 -10
  363. package/dist/sync/policies/index.js.map +1 -1
  364. package/dist/sync/scanners/b2.cjs +4 -2
  365. package/dist/sync/scanners/b2.cjs.map +1 -1
  366. package/dist/sync/scanners/b2.d.cts.map +1 -1
  367. package/dist/sync/scanners/b2.d.ts.map +1 -1
  368. package/dist/sync/scanners/b2.js +4 -2
  369. package/dist/sync/scanners/b2.js.map +1 -1
  370. package/dist/sync/scanners/local.cjs +150 -33
  371. package/dist/sync/scanners/local.cjs.map +1 -1
  372. package/dist/sync/scanners/local.d.cts +6 -0
  373. package/dist/sync/scanners/local.d.cts.map +1 -1
  374. package/dist/sync/scanners/local.d.ts +6 -0
  375. package/dist/sync/scanners/local.d.ts.map +1 -1
  376. package/dist/sync/scanners/local.js +150 -33
  377. package/dist/sync/scanners/local.js.map +1 -1
  378. package/dist/sync/synchronizer.cjs +79 -31
  379. package/dist/sync/synchronizer.cjs.map +1 -1
  380. package/dist/sync/synchronizer.d.cts +1 -0
  381. package/dist/sync/synchronizer.d.cts.map +1 -1
  382. package/dist/sync/synchronizer.d.ts +1 -0
  383. package/dist/sync/synchronizer.d.ts.map +1 -1
  384. package/dist/sync/synchronizer.js +79 -31
  385. package/dist/sync/synchronizer.js.map +1 -1
  386. package/dist/sync/types.d.cts +19 -3
  387. package/dist/sync/types.d.cts.map +1 -1
  388. package/dist/sync/types.d.ts +19 -3
  389. package/dist/sync/types.d.ts.map +1 -1
  390. package/dist/types/auth.cjs +4 -0
  391. package/dist/types/auth.cjs.map +1 -1
  392. package/dist/types/auth.d.cts +4 -0
  393. package/dist/types/auth.d.cts.map +1 -1
  394. package/dist/types/auth.d.ts +4 -0
  395. package/dist/types/auth.d.ts.map +1 -1
  396. package/dist/types/auth.js +4 -0
  397. package/dist/types/auth.js.map +1 -1
  398. package/dist/types/backup.d.cts +85 -0
  399. package/dist/types/backup.d.cts.map +1 -0
  400. package/dist/types/backup.d.ts +85 -0
  401. package/dist/types/backup.d.ts.map +1 -0
  402. package/dist/types/bucket.cjs +81 -11
  403. package/dist/types/bucket.cjs.map +1 -1
  404. package/dist/types/bucket.d.cts +194 -41
  405. package/dist/types/bucket.d.cts.map +1 -1
  406. package/dist/types/bucket.d.ts +194 -41
  407. package/dist/types/bucket.d.ts.map +1 -1
  408. package/dist/types/bucket.js +67 -12
  409. package/dist/types/bucket.js.map +1 -1
  410. package/dist/types/download.cjs +62 -0
  411. package/dist/types/download.cjs.map +1 -0
  412. package/dist/types/download.d.cts +100 -16
  413. package/dist/types/download.d.cts.map +1 -1
  414. package/dist/types/download.d.ts +100 -16
  415. package/dist/types/download.d.ts.map +1 -1
  416. package/dist/types/download.js +61 -0
  417. package/dist/types/download.js.map +1 -0
  418. package/dist/types/encryption.cjs +76 -229
  419. package/dist/types/encryption.cjs.map +1 -1
  420. package/dist/types/encryption.d.cts +48 -6
  421. package/dist/types/encryption.d.cts.map +1 -1
  422. package/dist/types/encryption.d.ts +48 -6
  423. package/dist/types/encryption.d.ts.map +1 -1
  424. package/dist/types/encryption.js +74 -229
  425. package/dist/types/encryption.js.map +1 -1
  426. package/dist/types/errors.cjs +9 -0
  427. package/dist/types/errors.cjs.map +1 -1
  428. package/dist/types/errors.d.cts +1 -1
  429. package/dist/types/errors.d.cts.map +1 -1
  430. package/dist/types/errors.d.ts +1 -1
  431. package/dist/types/errors.d.ts.map +1 -1
  432. package/dist/types/errors.js +9 -0
  433. package/dist/types/errors.js.map +1 -1
  434. package/dist/types/file.cjs +3 -0
  435. package/dist/types/file.cjs.map +1 -1
  436. package/dist/types/file.d.cts +140 -18
  437. package/dist/types/file.d.cts.map +1 -1
  438. package/dist/types/file.d.ts +140 -18
  439. package/dist/types/file.d.ts.map +1 -1
  440. package/dist/types/file.js +3 -1
  441. package/dist/types/file.js.map +1 -1
  442. package/dist/types/ids.cjs +30 -0
  443. package/dist/types/ids.cjs.map +1 -1
  444. package/dist/types/ids.d.cts +32 -0
  445. package/dist/types/ids.d.cts.map +1 -1
  446. package/dist/types/ids.d.ts +32 -0
  447. package/dist/types/ids.d.ts.map +1 -1
  448. package/dist/types/ids.js +28 -1
  449. package/dist/types/ids.js.map +1 -1
  450. package/dist/types/index.d.cts +16 -12
  451. package/dist/types/index.d.cts.map +1 -1
  452. package/dist/types/index.d.ts +16 -12
  453. package/dist/types/index.d.ts.map +1 -1
  454. package/dist/types/key.d.cts +4 -3
  455. package/dist/types/key.d.cts.map +1 -1
  456. package/dist/types/key.d.ts +4 -3
  457. package/dist/types/key.d.ts.map +1 -1
  458. package/dist/types/lock.cjs.map +1 -1
  459. package/dist/types/lock.d.cts +14 -0
  460. package/dist/types/lock.d.cts.map +1 -1
  461. package/dist/types/lock.d.ts +14 -0
  462. package/dist/types/lock.d.ts.map +1 -1
  463. package/dist/types/lock.js.map +1 -1
  464. package/dist/types/notifications.cjs +31 -1
  465. package/dist/types/notifications.cjs.map +1 -1
  466. package/dist/types/notifications.d.cts +31 -4
  467. package/dist/types/notifications.d.cts.map +1 -1
  468. package/dist/types/notifications.d.ts +31 -4
  469. package/dist/types/notifications.d.ts.map +1 -1
  470. package/dist/types/notifications.js +30 -2
  471. package/dist/types/notifications.js.map +1 -1
  472. package/dist/types/partner.cjs +32 -0
  473. package/dist/types/partner.cjs.map +1 -0
  474. package/dist/types/partner.d.cts +386 -0
  475. package/dist/types/partner.d.cts.map +1 -0
  476. package/dist/types/partner.d.ts +386 -0
  477. package/dist/types/partner.d.ts.map +1 -0
  478. package/dist/types/partner.js +29 -0
  479. package/dist/types/partner.js.map +1 -0
  480. package/dist/types/upload.d.cts +35 -18
  481. package/dist/types/upload.d.cts.map +1 -1
  482. package/dist/types/upload.d.ts +35 -18
  483. package/dist/types/upload.d.ts.map +1 -1
  484. package/dist/upload/abort-scope.cjs +0 -45
  485. package/dist/upload/abort-scope.cjs.map +1 -1
  486. package/dist/upload/abort-scope.d.cts +0 -22
  487. package/dist/upload/abort-scope.d.cts.map +1 -1
  488. package/dist/upload/abort-scope.d.ts +0 -22
  489. package/dist/upload/abort-scope.d.ts.map +1 -1
  490. package/dist/upload/abort-scope.js +1 -44
  491. package/dist/upload/abort-scope.js.map +1 -1
  492. package/dist/upload/finish.cjs +3 -8
  493. package/dist/upload/finish.cjs.map +1 -1
  494. package/dist/upload/finish.d.cts.map +1 -1
  495. package/dist/upload/finish.d.ts.map +1 -1
  496. package/dist/upload/finish.js +1 -6
  497. package/dist/upload/finish.js.map +1 -1
  498. package/dist/upload/large.cjs +15 -8
  499. package/dist/upload/large.cjs.map +1 -1
  500. package/dist/upload/large.d.cts +31 -8
  501. package/dist/upload/large.d.cts.map +1 -1
  502. package/dist/upload/large.d.ts +31 -8
  503. package/dist/upload/large.d.ts.map +1 -1
  504. package/dist/upload/large.js +15 -8
  505. package/dist/upload/large.js.map +1 -1
  506. package/dist/upload/options.cjs.map +1 -1
  507. package/dist/upload/options.d.cts +24 -0
  508. package/dist/upload/options.d.cts.map +1 -1
  509. package/dist/upload/options.d.ts +24 -0
  510. package/dist/upload/options.d.ts.map +1 -1
  511. package/dist/upload/options.js.map +1 -1
  512. package/dist/upload/resume.cjs +6 -4
  513. package/dist/upload/resume.cjs.map +1 -1
  514. package/dist/upload/resume.d.cts +9 -5
  515. package/dist/upload/resume.d.cts.map +1 -1
  516. package/dist/upload/resume.d.ts +9 -5
  517. package/dist/upload/resume.d.ts.map +1 -1
  518. package/dist/upload/resume.js +6 -4
  519. package/dist/upload/resume.js.map +1 -1
  520. package/dist/upload/retry.cjs +25 -13
  521. package/dist/upload/retry.cjs.map +1 -1
  522. package/dist/upload/retry.d.cts.map +1 -1
  523. package/dist/upload/retry.d.ts.map +1 -1
  524. package/dist/upload/retry.js +25 -13
  525. package/dist/upload/retry.js.map +1 -1
  526. package/dist/upload/single.cjs +35 -30
  527. package/dist/upload/single.cjs.map +1 -1
  528. package/dist/upload/single.d.cts +12 -0
  529. package/dist/upload/single.d.cts.map +1 -1
  530. package/dist/upload/single.d.ts +12 -0
  531. package/dist/upload/single.d.ts.map +1 -1
  532. package/dist/upload/single.js +35 -30
  533. package/dist/upload/single.js.map +1 -1
  534. package/dist/upload/stream.cjs +18 -5
  535. package/dist/upload/stream.cjs.map +1 -1
  536. package/dist/upload/stream.d.cts +12 -0
  537. package/dist/upload/stream.d.cts.map +1 -1
  538. package/dist/upload/stream.d.ts +12 -0
  539. package/dist/upload/stream.d.ts.map +1 -1
  540. package/dist/upload/stream.js +15 -2
  541. package/dist/upload/stream.js.map +1 -1
  542. package/dist/util/abort.cjs +114 -0
  543. package/dist/util/abort.cjs.map +1 -0
  544. package/dist/util/abort.d.cts +65 -0
  545. package/dist/util/abort.d.cts.map +1 -0
  546. package/dist/util/abort.d.ts +65 -0
  547. package/dist/util/abort.d.ts.map +1 -0
  548. package/dist/util/abort.js +109 -0
  549. package/dist/util/abort.js.map +1 -0
  550. package/dist/util/defaults.cjs +3 -0
  551. package/dist/util/defaults.cjs.map +1 -1
  552. package/dist/util/defaults.d.cts +2 -0
  553. package/dist/util/defaults.d.cts.map +1 -1
  554. package/dist/util/defaults.d.ts +2 -0
  555. package/dist/util/defaults.d.ts.map +1 -1
  556. package/dist/util/defaults.js +3 -1
  557. package/dist/util/defaults.js.map +1 -1
  558. package/dist/util/md5.cjs +211 -0
  559. package/dist/util/md5.cjs.map +1 -0
  560. package/dist/util/md5.d.cts +43 -0
  561. package/dist/util/md5.d.cts.map +1 -0
  562. package/dist/util/md5.d.ts +43 -0
  563. package/dist/util/md5.d.ts.map +1 -0
  564. package/dist/util/md5.js +209 -0
  565. package/dist/util/md5.js.map +1 -0
  566. package/dist/util/normalize.cjs +5 -5
  567. package/dist/util/normalize.cjs.map +1 -1
  568. package/dist/util/normalize.d.cts +7 -7
  569. package/dist/util/normalize.d.cts.map +1 -1
  570. package/dist/util/normalize.d.ts +7 -7
  571. package/dist/util/normalize.d.ts.map +1 -1
  572. package/dist/util/normalize.js +5 -5
  573. package/dist/util/normalize.js.map +1 -1
  574. package/dist/util/paginator.cjs +7 -1
  575. package/dist/util/paginator.cjs.map +1 -1
  576. package/dist/util/paginator.d.cts +3 -1
  577. package/dist/util/paginator.d.cts.map +1 -1
  578. package/dist/util/paginator.d.ts +3 -1
  579. package/dist/util/paginator.d.ts.map +1 -1
  580. package/dist/util/paginator.js +7 -1
  581. package/dist/util/paginator.js.map +1 -1
  582. package/dist/version.cjs +56 -4
  583. package/dist/version.cjs.map +1 -1
  584. package/dist/version.d.cts +53 -4
  585. package/dist/version.d.cts.map +1 -1
  586. package/dist/version.d.ts +53 -4
  587. package/dist/version.d.ts.map +1 -1
  588. package/dist/version.js +52 -5
  589. package/dist/version.js.map +1 -1
  590. package/package.json +47 -18
@@ -1 +1 @@
1
- {"version":3,"file":"file.js","names":[],"sources":["../../src/types/file.ts"],"sourcesContent":["import type { EncryptionSetting, PublicEncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId, FileId } from './ids.ts'\nimport type { FileRetentionValue, LegalHoldValue } from './lock.ts'\n\n/**\n * Named constants for the action that created a file version.\n *\n * @example\n * ```ts\n * if (file.action === FileAction.Hide) { ... }\n * ```\n */\nexport const FileAction = {\n /** Large file upload started but not yet finished. */\n Start: 'start',\n /** Normal upload (small or finished large file). */\n Upload: 'upload',\n /** Hide marker (soft delete). */\n Hide: 'hide',\n /** Virtual folder marker. */\n Folder: 'folder',\n /** Created via server-side copy. */\n Copy: 'copy',\n} as const\n\n/**\n * The action that created a file version. Derived from {@link FileAction}.\n *\n * - `'start'`: large file upload started but not yet finished.\n * - `'upload'`: file was uploaded normally.\n * - `'hide'`: file was hidden (soft-deleted).\n * - `'folder'`: virtual folder marker.\n * - `'copy'`: file was created via server-side copy.\n */\nexport type FileAction = (typeof FileAction)[keyof typeof FileAction]\n\n/**\n * Complete metadata for a single file version in B2.\n * Returned by `b2_get_file_info`, `b2_list_file_names`, `b2_list_file_versions`,\n * `b2_upload_file`, `b2_copy_file`, and other file-related endpoints.\n */\nexport interface FileVersion {\n /** Account that owns this file. */\n readonly accountId: AccountId\n /** Action that created this file version. */\n readonly action: FileAction\n /** Bucket containing this file. */\n readonly bucketId: BucketId\n /** Size of the file content in bytes. */\n readonly contentLength: number\n /** MD5 checksum of the content, or null if not available. */\n readonly contentMd5: string | null\n /** SHA-1 checksum of the content, or null if not available (e.g., large files). */\n readonly contentSha1: string | null\n /** MIME type of the file content. */\n readonly contentType: string\n /** Unique identifier for this file version. */\n readonly fileId: FileId\n /** User-defined key-value metadata stored with the file. */\n readonly fileInfo: Record<string, string>\n /** Full path and name of the file within the bucket. */\n readonly fileName: string\n /** Object Lock retention settings for this file version. */\n readonly fileRetention: {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null if the caller lacks read authorization. */\n readonly value: FileRetentionValue | null\n }\n /** Legal hold status for this file version. */\n readonly legalHold: {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null if the caller lacks read authorization. */\n readonly value: LegalHoldValue | null\n }\n /** Replication status, or null if replication is not configured. */\n readonly replicationStatus: 'pending' | 'completed' | 'failed' | 'replica' | null\n /** Server-side encryption settings applied to this file version. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this version was uploaded. */\n readonly uploadTimestamp: number\n}\n\n/** Request parameters for the `b2_list_file_names` API call. Lists the most recent version of each file in a bucket. */\nexport interface ListFileNamesRequest {\n /** Bucket to list files from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Maximum number of files to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter?: string\n}\n\n/** Response from the `b2_list_file_names` API call. */\nexport interface ListFileNamesResponse {\n /** Array of file versions matching the request. */\n readonly files: readonly FileVersion[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/** Request parameters for the `b2_list_file_versions` API call. Lists all versions of files in a bucket. */\nexport interface ListFileVersionsRequest {\n /** Bucket to list file versions from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Return file versions starting after this ID. Used with startFileName for pagination. */\n readonly startFileId?: FileId\n /** Maximum number of file versions to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter?: string\n}\n\n/** Response from the `b2_list_file_versions` API call. */\nexport interface ListFileVersionsResponse {\n /** Array of file versions matching the request. */\n readonly files: readonly FileVersion[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Request parameters for the `b2_get_file_info` API call. */\nexport interface GetFileInfoRequest {\n /** ID of the file version to retrieve info for. */\n readonly fileId: FileId\n}\n\n/** Request parameters for the `b2_hide_file` API call. Hides a file so it no longer appears in `b2_list_file_names`. */\nexport interface HideFileRequest {\n /** Bucket containing the file to hide. */\n readonly bucketId: BucketId\n /** Name of the file to hide. */\n readonly fileName: string\n}\n\n/** Request parameters for the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionRequest {\n /** Name of the file version to delete. */\n readonly fileName: string\n /** ID of the file version to delete. */\n readonly fileId: FileId\n /** If true, bypass governance-mode retention. Requires the `bypassGovernance` capability. */\n readonly bypassGovernance?: boolean\n}\n\n/** Response from the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionResponse {\n /** ID of the deleted file version. */\n readonly fileId: FileId\n /** Name of the deleted file. */\n readonly fileName: string\n}\n\n/**\n * Named constants for how metadata is handled during a file copy.\n *\n * @example\n * ```ts\n * await bucket.copyFile({ ..., metadataDirective: MetadataDirective.Replace })\n * ```\n */\nexport const MetadataDirective = {\n /** Preserve the source file's contentType and fileInfo. */\n Copy: 'COPY',\n /** Use the values provided in the copy request. */\n Replace: 'REPLACE',\n} as const\n\n/** Controls how metadata is handled during a file copy. Derived from {@link MetadataDirective}. */\nexport type MetadataDirective = (typeof MetadataDirective)[keyof typeof MetadataDirective]\n\n/** Request parameters for the `b2_copy_file` API call. Performs a server-side file copy. */\nexport interface CopyFileRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** Destination bucket ID. Defaults to the source bucket if omitted. */\n readonly destinationBucketId?: BucketId\n /** Name for the destination file. */\n readonly fileName: string\n /** Byte range to copy (e.g., `'bytes=0-999'`). Omit to copy the entire file. */\n readonly range?: string\n /** Whether to copy or replace the source file's metadata. */\n readonly metadataDirective?: MetadataDirective\n /** MIME type for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly contentType?: string\n /** User-defined metadata for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly fileInfo?: Record<string, string>\n /** Object Lock retention for the destination file. */\n readonly fileRetention?: FileRetentionValue\n /** Legal hold for the destination file. */\n readonly legalHold?: LegalHoldValue\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination file. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Request parameters for the `b2_copy_part` API call. Copies a byte range into a large file part. */\nexport interface CopyPartRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** ID of the large file being assembled. */\n readonly largeFileId: FileId\n /** Part number (1-based) for this part within the large file. */\n readonly partNumber: number\n /** Byte range to copy from the source (e.g., `'bytes=0-999'`). Omit to copy the entire source. */\n readonly range?: string\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination part. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Response from the `b2_copy_part` API call. */\nexport interface CopyPartResponse {\n /** ID of the large file this part belongs to. */\n readonly fileId: FileId\n /** Part number within the large file. */\n readonly partNumber: number\n /** Size of the copied part in bytes. */\n readonly contentLength: number\n /** SHA-1 checksum of the copied part content. */\n readonly contentSha1: string\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,aAAa;;CAExB,OAAO;;CAEP,QAAQ;;CAER,MAAM;;CAEN,QAAQ;;CAER,MAAM;AACR;;;;;;;;;AAqJA,IAAa,oBAAoB;;CAE/B,MAAM;;CAEN,SAAS;AACX"}
1
+ {"version":3,"file":"file.js","names":[],"sources":["../../src/types/file.ts"],"sourcesContent":["import type { EncryptionSetting, PublicEncryptionSetting } from './encryption.ts'\nimport type { AccountId, BucketId, FileId } from './ids.ts'\nimport type { FileRetentionValue, LegalHoldValue } from './lock.ts'\n\n/**\n * Named constants for the action that created a file version.\n *\n * @example\n * ```ts\n * if (file.action === FileAction.Hide) { ... }\n * ```\n */\nexport const FileAction = {\n /** Large file upload started but not yet finished. */\n Start: 'start',\n /** Normal upload (small or finished large file). */\n Upload: 'upload',\n /** Hide marker (soft delete). */\n Hide: 'hide',\n /** Virtual folder marker. */\n Folder: 'folder',\n /** Created via server-side copy. */\n Copy: 'copy',\n} as const\n\n/** MIME type B2 returns for hide-marker rows in `b2_list_file_versions`. */\nexport const HIDE_MARKER_CONTENT_TYPE = 'application/x-bz-hide-marker' as const\n\n/**\n * The action that created a file version. Derived from {@link FileAction}.\n *\n * - `'start'`: large file upload started but not yet finished.\n * - `'upload'`: file was uploaded normally.\n * - `'hide'`: file was hidden (soft-deleted).\n * - `'folder'`: virtual folder marker.\n * - `'copy'`: file was created via server-side copy.\n */\nexport type FileAction = (typeof FileAction)[keyof typeof FileAction]\n\n/** File actions that represent concrete file versions with a B2 file ID. */\nexport type ConcreteFileAction = Exclude<FileAction, typeof FileAction.Folder>\n\n/** File actions that represent listed concrete versions with file metadata. */\nexport type ListedFileAction = Exclude<ConcreteFileAction, typeof FileAction.Hide>\n\n/**\n * Replication status for a file version or unfinished large file.\n *\n * B2 returns these uppercase wire values as-is and omits the containing\n * `replicationStatus` field when the file is not covered by a replication rule.\n */\nexport type ReplicationStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REPLICA'\n\n/**\n * Complete metadata for a concrete file version in B2. Returned by\n * `b2_get_file_info`, `b2_upload_file`, `b2_copy_file`, `b2_hide_file`, and\n * other file-related endpoints. List endpoints return\n * {@link ListedFileVersion} for file-name listings and\n * {@link ListedConcreteFileVersion} for file-version listings unless a\n * delimiter is requested, in which case file-name listings return\n * {@link FileNameListEntry} and file-version listings return\n * {@link FileVersionListEntry}.\n */\nexport interface FileVersion {\n /** Account that owns this file. */\n readonly accountId: AccountId\n /** Action that created this file version. */\n readonly action: ConcreteFileAction\n /** Bucket containing this file. */\n readonly bucketId: BucketId\n /** Size of the file content in bytes. */\n readonly contentLength: number\n /** MD5 checksum of the content, or null if not available. */\n readonly contentMd5: string | null\n /** SHA-1 checksum of the content, or null if not available (e.g., large files). */\n readonly contentSha1: string | null\n /** MIME type of the file content. */\n readonly contentType: string\n /** Unique identifier for this file version. */\n readonly fileId: FileId\n /** User-defined key-value metadata stored with the file. */\n readonly fileInfo: Record<string, string>\n /** Full path and name of the file within the bucket. */\n readonly fileName: string\n /** Object Lock retention settings for this file version. */\n readonly fileRetention: {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null if the caller lacks read authorization. */\n readonly value: FileRetentionValue | null\n }\n /** Legal hold status for this file version. */\n readonly legalHold: {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null if the caller lacks read authorization. */\n readonly value: LegalHoldValue | null\n }\n /** Replication status when this file is covered by a replication rule. */\n readonly replicationStatus?: ReplicationStatus\n /** Server-side encryption settings applied to this file version. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this version was uploaded. */\n readonly uploadTimestamp: number\n}\n\n/** Concrete non-hide file version as returned from list endpoints. */\nexport interface ListedFileVersion extends Omit<FileVersion, 'action'> {\n /** Non-hide action with full file metadata. */\n readonly action: ListedFileAction\n}\n\n/** Hide marker as returned from list endpoints when B2 omits metadata fields. */\nexport interface ListedHideFileVersion\n extends Omit<\n FileVersion,\n 'action' | 'contentType' | 'fileRetention' | 'legalHold' | 'serverSideEncryption'\n > {\n /** Hide marker (soft delete). */\n readonly action: typeof FileAction.Hide\n /** B2 list APIs return the documented hide-marker MIME type. */\n readonly contentType: typeof HIDE_MARKER_CONTENT_TYPE\n}\n\n/** Virtual folder row returned by list endpoints when a delimiter groups file names. */\nexport interface FolderFileVersion {\n /** Account that owns this bucket. */\n readonly accountId: AccountId\n /** Virtual folder marker. */\n readonly action: typeof FileAction.Folder\n /** Bucket containing the grouped files. */\n readonly bucketId: BucketId\n /** Always 0 for virtual folder rows. */\n readonly contentLength: 0\n /** Always null for virtual folder rows. */\n readonly contentMd5: null\n /** Always null for virtual folder rows. */\n readonly contentSha1: null\n /** Always null for virtual folder rows. */\n readonly contentType: null\n /** Always null for virtual folder rows. */\n readonly fileId: null\n /** Virtual folder rows do not carry file metadata. */\n readonly fileInfo: Record<string, string>\n /** Folder name, including the delimiter suffix. */\n readonly fileName: string\n /** Always 0 for virtual folder rows. */\n readonly uploadTimestamp: 0\n}\n\n/** Concrete file-version entry returned by list endpoints. */\nexport type ListedConcreteFileVersion = ListedFileVersion | ListedHideFileVersion\n\n/** Entry returned by `b2_list_file_names` when a delimiter groups file names. */\nexport type FileNameListEntry = ListedFileVersion | FolderFileVersion\n\n/** Entry returned by `b2_list_file_names` and `b2_list_file_versions`. */\nexport type FileVersionListEntry = ListedConcreteFileVersion | FolderFileVersion\n\n/**\n * Request parameters shared by `b2_list_file_names` calls.\n */\nexport interface ListFileNamesBaseRequest {\n /** Bucket to list files from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Maximum number of files to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n}\n\n/**\n * Request parameters for the non-delimiter `b2_list_file_names` API call.\n * Lists visible latest file versions in a bucket without hide markers or\n * virtual folder rows. Use {@link ListFileNamesWithDelimiterRequest} when\n * sending a `delimiter`.\n */\nexport interface ListFileNamesRequest extends ListFileNamesBaseRequest {\n /** Omit delimiter to receive only visible concrete file-version entries. */\n readonly delimiter?: undefined\n}\n\n/** Request parameters for delimiter-grouped `b2_list_file_names` calls. */\nexport interface ListFileNamesWithDelimiterRequest extends ListFileNamesBaseRequest {\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter: string\n}\n\n/** Request parameters for callers that dynamically include a delimiter. */\nexport interface ListFileNamesMaybeDelimiterRequest extends ListFileNamesBaseRequest {\n /** Optional delimiter for virtual folder grouping. */\n readonly delimiter?: string | undefined\n}\n\n/** Response from non-delimiter `b2_list_file_names` calls. */\nexport interface ListFileNamesResponse {\n /** Array of visible concrete file-version entries matching the request. */\n readonly files: readonly ListedFileVersion[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/** Response from delimiter-grouped `b2_list_file_names` calls. */\nexport interface ListFileNamesWithDelimiterResponse {\n /** Array of visible concrete file-version or virtual-folder entries. */\n readonly files: readonly FileNameListEntry[]\n /** Next file name to use for pagination, or null if all files have been listed. */\n readonly nextFileName: string | null\n}\n\n/**\n * Request parameters shared by `b2_list_file_versions` calls.\n */\nexport interface ListFileVersionsBaseRequest {\n /** Bucket to list file versions from. */\n readonly bucketId: BucketId\n /** Return files starting after this name (exclusive). Used for pagination. */\n readonly startFileName?: string\n /** Return file versions starting after this ID. Used with startFileName for pagination. */\n readonly startFileId?: FileId\n /** Maximum number of file versions to return (1 to 10000). */\n readonly maxFileCount?: number\n /** Only return files whose names start with this prefix. */\n readonly prefix?: string\n}\n\n/**\n * Request parameters for the non-delimiter `b2_list_file_versions` API call.\n * Lists all versions of files in a bucket without virtual folder rows. Use\n * {@link ListFileVersionsWithDelimiterRequest} when sending a `delimiter`.\n */\nexport interface ListFileVersionsRequest extends ListFileVersionsBaseRequest {\n /** Omit delimiter to receive only concrete file-version entries. */\n readonly delimiter?: undefined\n}\n\n/** Request parameters for delimiter-grouped `b2_list_file_versions` calls. */\nexport interface ListFileVersionsWithDelimiterRequest extends ListFileVersionsBaseRequest {\n /** Delimiter for virtual folder grouping (typically `'/'`). */\n readonly delimiter: string\n}\n\n/** Request parameters for callers that dynamically include a delimiter. */\nexport interface ListFileVersionsMaybeDelimiterRequest extends ListFileVersionsBaseRequest {\n /** Optional delimiter for virtual folder grouping. */\n readonly delimiter?: string | undefined\n}\n\n/** Response from non-delimiter `b2_list_file_versions` calls. */\nexport interface ListFileVersionsResponse {\n /** Array of concrete file-version entries matching the request. */\n readonly files: readonly ListedConcreteFileVersion[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Response from delimiter-grouped `b2_list_file_versions` calls. */\nexport interface ListFileVersionsWithDelimiterResponse {\n /** Array of concrete file-version or virtual-folder entries matching the request. */\n readonly files: readonly FileVersionListEntry[]\n /** Next file name to use for pagination, or null if all versions have been listed. */\n readonly nextFileName: string | null\n /** Next file ID to use for pagination, or null if all versions have been listed. */\n readonly nextFileId: FileId | null\n}\n\n/** Request parameters for the `b2_get_file_info` API call. */\nexport interface GetFileInfoRequest {\n /** ID of the file version to retrieve info for. */\n readonly fileId: FileId\n}\n\n/** Request parameters for the `b2_hide_file` API call. Hides a file so it no longer appears in `b2_list_file_names`. */\nexport interface HideFileRequest {\n /** Bucket containing the file to hide. */\n readonly bucketId: BucketId\n /** Name of the file to hide. */\n readonly fileName: string\n}\n\n/** Request parameters for the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionRequest {\n /** Name of the file version to delete. */\n readonly fileName: string\n /** ID of the file version to delete. */\n readonly fileId: FileId\n /** If true, bypass governance-mode retention. Requires the `bypassGovernance` capability. */\n readonly bypassGovernance?: boolean\n}\n\n/** Response from the `b2_delete_file_version` API call. */\nexport interface DeleteFileVersionResponse {\n /** ID of the deleted file version. */\n readonly fileId: FileId\n /** Name of the deleted file. */\n readonly fileName: string\n}\n\n/**\n * Named constants for how metadata is handled during a file copy.\n *\n * @example\n * ```ts\n * await bucket.copyFile({ ..., metadataDirective: MetadataDirective.Replace })\n * ```\n */\nexport const MetadataDirective = {\n /** Preserve the source file's contentType and fileInfo. */\n Copy: 'COPY',\n /** Use the values provided in the copy request. */\n Replace: 'REPLACE',\n} as const\n\n/** Controls how metadata is handled during a file copy. Derived from {@link MetadataDirective}. */\nexport type MetadataDirective = (typeof MetadataDirective)[keyof typeof MetadataDirective]\n\n/** Request parameters for the `b2_copy_file` API call. Performs a server-side file copy. */\nexport interface CopyFileRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** Destination bucket ID. Defaults to the source bucket if omitted. */\n readonly destinationBucketId?: BucketId\n /** Name for the destination file. */\n readonly fileName: string\n /** Byte range to copy (e.g., `'bytes=0-999'`). Omit to copy the entire file. */\n readonly range?: string\n /** Whether to copy or replace the source file's metadata. */\n readonly metadataDirective?: MetadataDirective\n /** MIME type for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly contentType?: string\n /** User-defined metadata for the destination file (only used when metadataDirective is `'REPLACE'`). */\n readonly fileInfo?: Record<string, string>\n /** Object Lock retention for the destination file. */\n readonly fileRetention?: FileRetentionValue\n /** Legal hold for the destination file. */\n readonly legalHold?: LegalHoldValue\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination file. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Request parameters for the `b2_copy_part` API call. Copies a byte range into a large file part. */\nexport interface CopyPartRequest {\n /** ID of the source file version to copy from. */\n readonly sourceFileId: FileId\n /** ID of the large file being assembled. */\n readonly largeFileId: FileId\n /** Part number (1-based) for this part within the large file. */\n readonly partNumber: number\n /** Byte range to copy from the source (e.g., `'bytes=0-999'`). Omit to copy the entire source. */\n readonly range?: string\n /** SSE-C settings for reading the source file, if the source is encrypted with SSE-C. */\n readonly sourceServerSideEncryption?: EncryptionSetting\n /** Server-side encryption to apply to the destination part. */\n readonly destinationServerSideEncryption?: EncryptionSetting\n}\n\n/** Response from the `b2_copy_part` API call. */\nexport interface CopyPartResponse {\n /** ID of the large file this part belongs to. */\n readonly fileId: FileId\n /** Part number within the large file. */\n readonly partNumber: number\n /** Size of the copied part in bytes. */\n readonly contentLength: number\n /** SHA-1 checksum of the copied part content. */\n readonly contentSha1: string\n /** MD5 checksum of the copied part content, or null if not available. */\n readonly contentMd5: string | null\n /** Server-side encryption applied to this copied part. */\n readonly serverSideEncryption: PublicEncryptionSetting\n /** UTC timestamp (milliseconds) when this part was copied. */\n readonly uploadTimestamp: number\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,aAAa;;CAExB,OAAO;;CAEP,QAAQ;;CAER,MAAM;;CAEN,QAAQ;;CAER,MAAM;AACR;;AAGA,IAAa,2BAA2B;;;;;;;;;AA4RxC,IAAa,oBAAoB;;CAE/B,MAAM;;CAEN,SAAS;AACX"}
@@ -45,6 +45,33 @@ function applicationKeyId(raw) {
45
45
  return raw;
46
46
  }
47
47
  /**
48
+ * Creates a branded {@link GroupId} from a raw string.
49
+ * @param raw - The raw group ID string from the Partner API.
50
+ *
51
+ * @returns A branded GroupId value.
52
+ */
53
+ function groupId(raw) {
54
+ return raw;
55
+ }
56
+ /**
57
+ * Creates a branded {@link ComputerId} from a raw string.
58
+ * @param raw - The raw computer ID string from the Computer Backup API.
59
+ *
60
+ * @returns A branded ComputerId value.
61
+ */
62
+ function computerId(raw) {
63
+ return raw;
64
+ }
65
+ /**
66
+ * Creates a branded {@link PartnerToken} from a raw authorization token string.
67
+ * @param raw - The raw Partner/Backup authorization token from the B2 API.
68
+ *
69
+ * @returns A branded PartnerToken value.
70
+ */
71
+ function partnerToken(raw) {
72
+ return raw;
73
+ }
74
+ /**
48
75
  * Creates a branded {@link LargeFileId} from a raw string.
49
76
  *
50
77
  * `LargeFileId` is the same wire-level shape as `FileId` but is a
@@ -64,8 +91,11 @@ function largeFileId(raw) {
64
91
  exports.accountId = accountId;
65
92
  exports.applicationKeyId = applicationKeyId;
66
93
  exports.bucketId = bucketId;
94
+ exports.computerId = computerId;
67
95
  exports.fileId = fileId;
96
+ exports.groupId = groupId;
68
97
  exports.keyId = keyId;
69
98
  exports.largeFileId = largeFileId;
99
+ exports.partnerToken = partnerToken;
70
100
 
71
101
  //# sourceMappingURL=ids.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ids.cjs","names":[],"sources":["../../src/types/ids.ts"],"sourcesContent":["/**\n * Unique symbol used to brand string types, preventing accidental mixing of different ID types.\n */\ndeclare const __brand: unique symbol\n\n/** Compile-time brand tag interface. Never instantiated at runtime. */\nexport interface BrandTag<B extends string> {\n /** Discriminant tag that makes branded types structurally incompatible. */\n readonly [__brand]: B\n}\n\n/**\n * Utility type that intersects a base type with a branded tag.\n * This pattern ensures that branded types are structurally incompatible with each other\n * even though they share the same underlying representation.\n */\nexport type Brand<T, B extends string> = T & BrandTag<B>\n\n/** Unique identifier for a B2 account. Branded to prevent mixing with other string IDs. */\nexport type AccountId = Brand<string, 'AccountId'>\n\n/** Unique identifier for a B2 bucket. Branded to prevent mixing with other string IDs. */\nexport type BucketId = Brand<string, 'BucketId'>\n\n/** Unique identifier for a B2 file version. Branded to prevent mixing with other string IDs. */\nexport type FileId = Brand<string, 'FileId'>\n\n/** Unique identifier for a B2 application key. Branded to prevent mixing with other string IDs. */\nexport type KeyId = Brand<string, 'KeyId'>\n\n/** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */\nexport type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>\n\n/** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */\nexport type UploadUrl = Brand<string, 'UploadUrl'>\n\n/** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */\nexport type UploadAuthToken = Brand<string, 'UploadAuthToken'>\n\n/** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */\nexport type AuthToken = Brand<string, 'AuthToken'>\n\n/** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */\nexport type LargeFileId = Brand<string, 'LargeFileId'>\n\n/**\n * Creates a branded {@link AccountId} from a raw string.\n * @param raw - The raw account ID string from the B2 API.\n *\n * @returns A branded AccountId value.\n */\nexport function accountId(raw: string): AccountId {\n return raw as AccountId\n}\n\n/**\n * Creates a branded {@link BucketId} from a raw string.\n * @param raw - The raw bucket ID string from the B2 API.\n *\n * @returns A branded BucketId value.\n */\nexport function bucketId(raw: string): BucketId {\n return raw as BucketId\n}\n\n/**\n * Creates a branded {@link FileId} from a raw string.\n * @param raw - The raw file ID string from the B2 API.\n *\n * @returns A branded FileId value.\n */\nexport function fileId(raw: string): FileId {\n return raw as FileId\n}\n\n/**\n * Creates a branded {@link KeyId} from a raw string.\n * @param raw - The raw key ID string from the B2 API.\n *\n * @returns A branded KeyId value.\n */\nexport function keyId(raw: string): KeyId {\n return raw as KeyId\n}\n\n/**\n * Creates a branded {@link ApplicationKeyId} from a raw string.\n * @param raw - The raw application key ID string from the B2 API.\n *\n * @returns A branded ApplicationKeyId value.\n */\nexport function applicationKeyId(raw: string): ApplicationKeyId {\n return raw as ApplicationKeyId\n}\n\n/**\n * Creates a branded {@link LargeFileId} from a raw string.\n *\n * `LargeFileId` is the same wire-level shape as `FileId` but is a\n * distinct brand so that \"ID of an in-progress multipart upload\" and\n * \"ID of a committed file version\" don't get mixed up by accident.\n * `b2_start_large_file` returns one; `b2_finish_large_file` consumes it\n * and produces a regular `FileId`.\n *\n * @param raw - The raw large-file ID string from the B2 API.\n *\n * @returns A branded LargeFileId value.\n */\nexport function largeFileId(raw: string): LargeFileId {\n return raw as LargeFileId\n}\n"],"mappings":";;;;;;;AAmDA,SAAgB,UAAU,KAAwB;CAChD,OAAO;AACT;;;;;;;AAQA,SAAgB,SAAS,KAAuB;CAC9C,OAAO;AACT;;;;;;;AAQA,SAAgB,OAAO,KAAqB;CAC1C,OAAO;AACT;;;;;;;AAQA,SAAgB,MAAM,KAAoB;CACxC,OAAO;AACT;;;;;;;AAQA,SAAgB,iBAAiB,KAA+B;CAC9D,OAAO;AACT;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAA0B;CACpD,OAAO;AACT"}
1
+ {"version":3,"file":"ids.cjs","names":[],"sources":["../../src/types/ids.ts"],"sourcesContent":["/**\n * Unique symbol used to brand string types, preventing accidental mixing of different ID types.\n */\ndeclare const __brand: unique symbol\n\n/** Compile-time brand tag interface. Never instantiated at runtime. */\nexport interface BrandTag<B extends string> {\n /** Discriminant tag that makes branded types structurally incompatible. */\n readonly [__brand]: B\n}\n\n/**\n * Utility type that intersects a base type with a branded tag.\n * This pattern ensures that branded types are structurally incompatible with each other\n * even though they share the same underlying representation.\n */\nexport type Brand<T, B extends string> = T & BrandTag<B>\n\n/** Unique identifier for a B2 account. Branded to prevent mixing with other string IDs. */\nexport type AccountId = Brand<string, 'AccountId'>\n\n/** Unique identifier for a B2 bucket. Branded to prevent mixing with other string IDs. */\nexport type BucketId = Brand<string, 'BucketId'>\n\n/** Unique identifier for a B2 file version. Branded to prevent mixing with other string IDs. */\nexport type FileId = Brand<string, 'FileId'>\n\n/** Unique identifier for a B2 application key. Branded to prevent mixing with other string IDs. */\nexport type KeyId = Brand<string, 'KeyId'>\n\n/** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */\nexport type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>\n\n/**\n * Unique identifier for a Partner API group. Branded to prevent mixing with other string IDs.\n *\n * Group IDs look numeric in some examples, but the Partner API returns them\n * as JSON strings. The SDK preserves the wire value as a branded string.\n */\nexport type GroupId = Brand<string, 'GroupId'>\n\n/** Unique identifier for a Computer Backup computer. Branded to prevent mixing with other string IDs. */\nexport type ComputerId = Brand<string, 'ComputerId'>\n\n/** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */\nexport type UploadUrl = Brand<string, 'UploadUrl'>\n\n/** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */\nexport type UploadAuthToken = Brand<string, 'UploadAuthToken'>\n\n/** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */\nexport type AuthToken = Brand<string, 'AuthToken'>\n\n/** Authorization token for Partner API and Computer Backup API requests. */\nexport type PartnerToken = Brand<string, 'PartnerToken'>\n\n/** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */\nexport type LargeFileId = Brand<string, 'LargeFileId'>\n\n/**\n * Creates a branded {@link AccountId} from a raw string.\n * @param raw - The raw account ID string from the B2 API.\n *\n * @returns A branded AccountId value.\n */\nexport function accountId(raw: string): AccountId {\n return raw as AccountId\n}\n\n/**\n * Creates a branded {@link BucketId} from a raw string.\n * @param raw - The raw bucket ID string from the B2 API.\n *\n * @returns A branded BucketId value.\n */\nexport function bucketId(raw: string): BucketId {\n return raw as BucketId\n}\n\n/**\n * Creates a branded {@link FileId} from a raw string.\n * @param raw - The raw file ID string from the B2 API.\n *\n * @returns A branded FileId value.\n */\nexport function fileId(raw: string): FileId {\n return raw as FileId\n}\n\n/**\n * Creates a branded {@link KeyId} from a raw string.\n * @param raw - The raw key ID string from the B2 API.\n *\n * @returns A branded KeyId value.\n */\nexport function keyId(raw: string): KeyId {\n return raw as KeyId\n}\n\n/**\n * Creates a branded {@link ApplicationKeyId} from a raw string.\n * @param raw - The raw application key ID string from the B2 API.\n *\n * @returns A branded ApplicationKeyId value.\n */\nexport function applicationKeyId(raw: string): ApplicationKeyId {\n return raw as ApplicationKeyId\n}\n\n/**\n * Creates a branded {@link GroupId} from a raw string.\n * @param raw - The raw group ID string from the Partner API.\n *\n * @returns A branded GroupId value.\n */\nexport function groupId(raw: string): GroupId {\n return raw as GroupId\n}\n\n/**\n * Creates a branded {@link ComputerId} from a raw string.\n * @param raw - The raw computer ID string from the Computer Backup API.\n *\n * @returns A branded ComputerId value.\n */\nexport function computerId(raw: string): ComputerId {\n return raw as ComputerId\n}\n\n/**\n * Creates a branded {@link PartnerToken} from a raw authorization token string.\n * @param raw - The raw Partner/Backup authorization token from the B2 API.\n *\n * @returns A branded PartnerToken value.\n */\nexport function partnerToken(raw: string): PartnerToken {\n return raw as PartnerToken\n}\n\n/**\n * Creates a branded {@link LargeFileId} from a raw string.\n *\n * `LargeFileId` is the same wire-level shape as `FileId` but is a\n * distinct brand so that \"ID of an in-progress multipart upload\" and\n * \"ID of a committed file version\" don't get mixed up by accident.\n * `b2_start_large_file` returns one; `b2_finish_large_file` consumes it\n * and produces a regular `FileId`.\n *\n * @param raw - The raw large-file ID string from the B2 API.\n *\n * @returns A branded LargeFileId value.\n */\nexport function largeFileId(raw: string): LargeFileId {\n return raw as LargeFileId\n}\n"],"mappings":";;;;;;;AAiEA,SAAgB,UAAU,KAAwB;CAChD,OAAO;AACT;;;;;;;AAQA,SAAgB,SAAS,KAAuB;CAC9C,OAAO;AACT;;;;;;;AAQA,SAAgB,OAAO,KAAqB;CAC1C,OAAO;AACT;;;;;;;AAQA,SAAgB,MAAM,KAAoB;CACxC,OAAO;AACT;;;;;;;AAQA,SAAgB,iBAAiB,KAA+B;CAC9D,OAAO;AACT;;;;;;;AAQA,SAAgB,QAAQ,KAAsB;CAC5C,OAAO;AACT;;;;;;;AAQA,SAAgB,WAAW,KAAyB;CAClD,OAAO;AACT;;;;;;;AAQA,SAAgB,aAAa,KAA2B;CACtD,OAAO;AACT;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAA0B;CACpD,OAAO;AACT"}
@@ -23,12 +23,23 @@ export type FileId = Brand<string, 'FileId'>;
23
23
  export type KeyId = Brand<string, 'KeyId'>;
24
24
  /** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */
25
25
  export type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>;
26
+ /**
27
+ * Unique identifier for a Partner API group. Branded to prevent mixing with other string IDs.
28
+ *
29
+ * Group IDs look numeric in some examples, but the Partner API returns them
30
+ * as JSON strings. The SDK preserves the wire value as a branded string.
31
+ */
32
+ export type GroupId = Brand<string, 'GroupId'>;
33
+ /** Unique identifier for a Computer Backup computer. Branded to prevent mixing with other string IDs. */
34
+ export type ComputerId = Brand<string, 'ComputerId'>;
26
35
  /** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */
27
36
  export type UploadUrl = Brand<string, 'UploadUrl'>;
28
37
  /** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */
29
38
  export type UploadAuthToken = Brand<string, 'UploadAuthToken'>;
30
39
  /** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */
31
40
  export type AuthToken = Brand<string, 'AuthToken'>;
41
+ /** Authorization token for Partner API and Computer Backup API requests. */
42
+ export type PartnerToken = Brand<string, 'PartnerToken'>;
32
43
  /** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */
33
44
  export type LargeFileId = Brand<string, 'LargeFileId'>;
34
45
  /**
@@ -66,6 +77,27 @@ export declare function keyId(raw: string): KeyId;
66
77
  * @returns A branded ApplicationKeyId value.
67
78
  */
68
79
  export declare function applicationKeyId(raw: string): ApplicationKeyId;
80
+ /**
81
+ * Creates a branded {@link GroupId} from a raw string.
82
+ * @param raw - The raw group ID string from the Partner API.
83
+ *
84
+ * @returns A branded GroupId value.
85
+ */
86
+ export declare function groupId(raw: string): GroupId;
87
+ /**
88
+ * Creates a branded {@link ComputerId} from a raw string.
89
+ * @param raw - The raw computer ID string from the Computer Backup API.
90
+ *
91
+ * @returns A branded ComputerId value.
92
+ */
93
+ export declare function computerId(raw: string): ComputerId;
94
+ /**
95
+ * Creates a branded {@link PartnerToken} from a raw authorization token string.
96
+ * @param raw - The raw Partner/Backup authorization token from the B2 API.
97
+ *
98
+ * @returns A branded PartnerToken value.
99
+ */
100
+ export declare function partnerToken(raw: string): PartnerToken;
69
101
  /**
70
102
  * Creates a branded {@link LargeFileId} from a raw string.
71
103
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/types/ids.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,CAAC,MA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;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAEpD"}
@@ -23,12 +23,23 @@ export type FileId = Brand<string, 'FileId'>;
23
23
  export type KeyId = Brand<string, 'KeyId'>;
24
24
  /** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */
25
25
  export type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>;
26
+ /**
27
+ * Unique identifier for a Partner API group. Branded to prevent mixing with other string IDs.
28
+ *
29
+ * Group IDs look numeric in some examples, but the Partner API returns them
30
+ * as JSON strings. The SDK preserves the wire value as a branded string.
31
+ */
32
+ export type GroupId = Brand<string, 'GroupId'>;
33
+ /** Unique identifier for a Computer Backup computer. Branded to prevent mixing with other string IDs. */
34
+ export type ComputerId = Brand<string, 'ComputerId'>;
26
35
  /** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */
27
36
  export type UploadUrl = Brand<string, 'UploadUrl'>;
28
37
  /** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */
29
38
  export type UploadAuthToken = Brand<string, 'UploadAuthToken'>;
30
39
  /** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */
31
40
  export type AuthToken = Brand<string, 'AuthToken'>;
41
+ /** Authorization token for Partner API and Computer Backup API requests. */
42
+ export type PartnerToken = Brand<string, 'PartnerToken'>;
32
43
  /** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */
33
44
  export type LargeFileId = Brand<string, 'LargeFileId'>;
34
45
  /**
@@ -66,6 +77,27 @@ export declare function keyId(raw: string): KeyId;
66
77
  * @returns A branded ApplicationKeyId value.
67
78
  */
68
79
  export declare function applicationKeyId(raw: string): ApplicationKeyId;
80
+ /**
81
+ * Creates a branded {@link GroupId} from a raw string.
82
+ * @param raw - The raw group ID string from the Partner API.
83
+ *
84
+ * @returns A branded GroupId value.
85
+ */
86
+ export declare function groupId(raw: string): GroupId;
87
+ /**
88
+ * Creates a branded {@link ComputerId} from a raw string.
89
+ * @param raw - The raw computer ID string from the Computer Backup API.
90
+ *
91
+ * @returns A branded ComputerId value.
92
+ */
93
+ export declare function computerId(raw: string): ComputerId;
94
+ /**
95
+ * Creates a branded {@link PartnerToken} from a raw authorization token string.
96
+ * @param raw - The raw Partner/Backup authorization token from the B2 API.
97
+ *
98
+ * @returns A branded PartnerToken value.
99
+ */
100
+ export declare function partnerToken(raw: string): PartnerToken;
69
101
  /**
70
102
  * Creates a branded {@link LargeFileId} from a raw string.
71
103
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/types/ids.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAA;AAEpC,uEAAuE;AACvE,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,MAAM;IACxC,2EAA2E;IAC3E,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAExD,2FAA2F;AAC3F,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAElD,0FAA0F;AAC1F,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAEhD,gGAAgG;AAChG,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAE5C,mGAAmG;AACnG,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE1C,2HAA2H;AAC3H,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE,8GAA8G;AAC9G,MAAM,MAAM,SAAS,GA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,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAExC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAEtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAEpD"}
package/dist/types/ids.js CHANGED
@@ -45,6 +45,33 @@ function applicationKeyId(raw) {
45
45
  return raw;
46
46
  }
47
47
  /**
48
+ * Creates a branded {@link GroupId} from a raw string.
49
+ * @param raw - The raw group ID string from the Partner API.
50
+ *
51
+ * @returns A branded GroupId value.
52
+ */
53
+ function groupId(raw) {
54
+ return raw;
55
+ }
56
+ /**
57
+ * Creates a branded {@link ComputerId} from a raw string.
58
+ * @param raw - The raw computer ID string from the Computer Backup API.
59
+ *
60
+ * @returns A branded ComputerId value.
61
+ */
62
+ function computerId(raw) {
63
+ return raw;
64
+ }
65
+ /**
66
+ * Creates a branded {@link PartnerToken} from a raw authorization token string.
67
+ * @param raw - The raw Partner/Backup authorization token from the B2 API.
68
+ *
69
+ * @returns A branded PartnerToken value.
70
+ */
71
+ function partnerToken(raw) {
72
+ return raw;
73
+ }
74
+ /**
48
75
  * Creates a branded {@link LargeFileId} from a raw string.
49
76
  *
50
77
  * `LargeFileId` is the same wire-level shape as `FileId` but is a
@@ -61,6 +88,6 @@ function largeFileId(raw) {
61
88
  return raw;
62
89
  }
63
90
  //#endregion
64
- export { accountId, applicationKeyId, bucketId, fileId, keyId, largeFileId };
91
+ export { accountId, applicationKeyId, bucketId, computerId, fileId, groupId, keyId, largeFileId, partnerToken };
65
92
 
66
93
  //# sourceMappingURL=ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ids.js","names":[],"sources":["../../src/types/ids.ts"],"sourcesContent":["/**\n * Unique symbol used to brand string types, preventing accidental mixing of different ID types.\n */\ndeclare const __brand: unique symbol\n\n/** Compile-time brand tag interface. Never instantiated at runtime. */\nexport interface BrandTag<B extends string> {\n /** Discriminant tag that makes branded types structurally incompatible. */\n readonly [__brand]: B\n}\n\n/**\n * Utility type that intersects a base type with a branded tag.\n * This pattern ensures that branded types are structurally incompatible with each other\n * even though they share the same underlying representation.\n */\nexport type Brand<T, B extends string> = T & BrandTag<B>\n\n/** Unique identifier for a B2 account. Branded to prevent mixing with other string IDs. */\nexport type AccountId = Brand<string, 'AccountId'>\n\n/** Unique identifier for a B2 bucket. Branded to prevent mixing with other string IDs. */\nexport type BucketId = Brand<string, 'BucketId'>\n\n/** Unique identifier for a B2 file version. Branded to prevent mixing with other string IDs. */\nexport type FileId = Brand<string, 'FileId'>\n\n/** Unique identifier for a B2 application key. Branded to prevent mixing with other string IDs. */\nexport type KeyId = Brand<string, 'KeyId'>\n\n/** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */\nexport type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>\n\n/** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */\nexport type UploadUrl = Brand<string, 'UploadUrl'>\n\n/** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */\nexport type UploadAuthToken = Brand<string, 'UploadAuthToken'>\n\n/** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */\nexport type AuthToken = Brand<string, 'AuthToken'>\n\n/** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */\nexport type LargeFileId = Brand<string, 'LargeFileId'>\n\n/**\n * Creates a branded {@link AccountId} from a raw string.\n * @param raw - The raw account ID string from the B2 API.\n *\n * @returns A branded AccountId value.\n */\nexport function accountId(raw: string): AccountId {\n return raw as AccountId\n}\n\n/**\n * Creates a branded {@link BucketId} from a raw string.\n * @param raw - The raw bucket ID string from the B2 API.\n *\n * @returns A branded BucketId value.\n */\nexport function bucketId(raw: string): BucketId {\n return raw as BucketId\n}\n\n/**\n * Creates a branded {@link FileId} from a raw string.\n * @param raw - The raw file ID string from the B2 API.\n *\n * @returns A branded FileId value.\n */\nexport function fileId(raw: string): FileId {\n return raw as FileId\n}\n\n/**\n * Creates a branded {@link KeyId} from a raw string.\n * @param raw - The raw key ID string from the B2 API.\n *\n * @returns A branded KeyId value.\n */\nexport function keyId(raw: string): KeyId {\n return raw as KeyId\n}\n\n/**\n * Creates a branded {@link ApplicationKeyId} from a raw string.\n * @param raw - The raw application key ID string from the B2 API.\n *\n * @returns A branded ApplicationKeyId value.\n */\nexport function applicationKeyId(raw: string): ApplicationKeyId {\n return raw as ApplicationKeyId\n}\n\n/**\n * Creates a branded {@link LargeFileId} from a raw string.\n *\n * `LargeFileId` is the same wire-level shape as `FileId` but is a\n * distinct brand so that \"ID of an in-progress multipart upload\" and\n * \"ID of a committed file version\" don't get mixed up by accident.\n * `b2_start_large_file` returns one; `b2_finish_large_file` consumes it\n * and produces a regular `FileId`.\n *\n * @param raw - The raw large-file ID string from the B2 API.\n *\n * @returns A branded LargeFileId value.\n */\nexport function largeFileId(raw: string): LargeFileId {\n return raw as LargeFileId\n}\n"],"mappings":";;;;;;;AAmDA,SAAgB,UAAU,KAAwB;CAChD,OAAO;AACT;;;;;;;AAQA,SAAgB,SAAS,KAAuB;CAC9C,OAAO;AACT;;;;;;;AAQA,SAAgB,OAAO,KAAqB;CAC1C,OAAO;AACT;;;;;;;AAQA,SAAgB,MAAM,KAAoB;CACxC,OAAO;AACT;;;;;;;AAQA,SAAgB,iBAAiB,KAA+B;CAC9D,OAAO;AACT;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAA0B;CACpD,OAAO;AACT"}
1
+ {"version":3,"file":"ids.js","names":[],"sources":["../../src/types/ids.ts"],"sourcesContent":["/**\n * Unique symbol used to brand string types, preventing accidental mixing of different ID types.\n */\ndeclare const __brand: unique symbol\n\n/** Compile-time brand tag interface. Never instantiated at runtime. */\nexport interface BrandTag<B extends string> {\n /** Discriminant tag that makes branded types structurally incompatible. */\n readonly [__brand]: B\n}\n\n/**\n * Utility type that intersects a base type with a branded tag.\n * This pattern ensures that branded types are structurally incompatible with each other\n * even though they share the same underlying representation.\n */\nexport type Brand<T, B extends string> = T & BrandTag<B>\n\n/** Unique identifier for a B2 account. Branded to prevent mixing with other string IDs. */\nexport type AccountId = Brand<string, 'AccountId'>\n\n/** Unique identifier for a B2 bucket. Branded to prevent mixing with other string IDs. */\nexport type BucketId = Brand<string, 'BucketId'>\n\n/** Unique identifier for a B2 file version. Branded to prevent mixing with other string IDs. */\nexport type FileId = Brand<string, 'FileId'>\n\n/** Unique identifier for a B2 application key. Branded to prevent mixing with other string IDs. */\nexport type KeyId = Brand<string, 'KeyId'>\n\n/** Unique identifier for a B2 application key, as returned by the API. Branded to prevent mixing with other string IDs. */\nexport type ApplicationKeyId = Brand<string, 'ApplicationKeyId'>\n\n/**\n * Unique identifier for a Partner API group. Branded to prevent mixing with other string IDs.\n *\n * Group IDs look numeric in some examples, but the Partner API returns them\n * as JSON strings. The SDK preserves the wire value as a branded string.\n */\nexport type GroupId = Brand<string, 'GroupId'>\n\n/** Unique identifier for a Computer Backup computer. Branded to prevent mixing with other string IDs. */\nexport type ComputerId = Brand<string, 'ComputerId'>\n\n/** Pre-signed URL for uploading files to a specific bucket. Branded to prevent misuse as a regular string. */\nexport type UploadUrl = Brand<string, 'UploadUrl'>\n\n/** Authorization token scoped to a specific upload URL. Branded to prevent mixing with other tokens. */\nexport type UploadAuthToken = Brand<string, 'UploadAuthToken'>\n\n/** Authorization token for B2 API requests. Branded to prevent mixing with other string values. */\nexport type AuthToken = Brand<string, 'AuthToken'>\n\n/** Authorization token for Partner API and Computer Backup API requests. */\nexport type PartnerToken = Brand<string, 'PartnerToken'>\n\n/** Unique identifier for a large file upload in progress. Branded to prevent mixing with regular FileId values. */\nexport type LargeFileId = Brand<string, 'LargeFileId'>\n\n/**\n * Creates a branded {@link AccountId} from a raw string.\n * @param raw - The raw account ID string from the B2 API.\n *\n * @returns A branded AccountId value.\n */\nexport function accountId(raw: string): AccountId {\n return raw as AccountId\n}\n\n/**\n * Creates a branded {@link BucketId} from a raw string.\n * @param raw - The raw bucket ID string from the B2 API.\n *\n * @returns A branded BucketId value.\n */\nexport function bucketId(raw: string): BucketId {\n return raw as BucketId\n}\n\n/**\n * Creates a branded {@link FileId} from a raw string.\n * @param raw - The raw file ID string from the B2 API.\n *\n * @returns A branded FileId value.\n */\nexport function fileId(raw: string): FileId {\n return raw as FileId\n}\n\n/**\n * Creates a branded {@link KeyId} from a raw string.\n * @param raw - The raw key ID string from the B2 API.\n *\n * @returns A branded KeyId value.\n */\nexport function keyId(raw: string): KeyId {\n return raw as KeyId\n}\n\n/**\n * Creates a branded {@link ApplicationKeyId} from a raw string.\n * @param raw - The raw application key ID string from the B2 API.\n *\n * @returns A branded ApplicationKeyId value.\n */\nexport function applicationKeyId(raw: string): ApplicationKeyId {\n return raw as ApplicationKeyId\n}\n\n/**\n * Creates a branded {@link GroupId} from a raw string.\n * @param raw - The raw group ID string from the Partner API.\n *\n * @returns A branded GroupId value.\n */\nexport function groupId(raw: string): GroupId {\n return raw as GroupId\n}\n\n/**\n * Creates a branded {@link ComputerId} from a raw string.\n * @param raw - The raw computer ID string from the Computer Backup API.\n *\n * @returns A branded ComputerId value.\n */\nexport function computerId(raw: string): ComputerId {\n return raw as ComputerId\n}\n\n/**\n * Creates a branded {@link PartnerToken} from a raw authorization token string.\n * @param raw - The raw Partner/Backup authorization token from the B2 API.\n *\n * @returns A branded PartnerToken value.\n */\nexport function partnerToken(raw: string): PartnerToken {\n return raw as PartnerToken\n}\n\n/**\n * Creates a branded {@link LargeFileId} from a raw string.\n *\n * `LargeFileId` is the same wire-level shape as `FileId` but is a\n * distinct brand so that \"ID of an in-progress multipart upload\" and\n * \"ID of a committed file version\" don't get mixed up by accident.\n * `b2_start_large_file` returns one; `b2_finish_large_file` consumes it\n * and produces a regular `FileId`.\n *\n * @param raw - The raw large-file ID string from the B2 API.\n *\n * @returns A branded LargeFileId value.\n */\nexport function largeFileId(raw: string): LargeFileId {\n return raw as LargeFileId\n}\n"],"mappings":";;;;;;;AAiEA,SAAgB,UAAU,KAAwB;CAChD,OAAO;AACT;;;;;;;AAQA,SAAgB,SAAS,KAAuB;CAC9C,OAAO;AACT;;;;;;;AAQA,SAAgB,OAAO,KAAqB;CAC1C,OAAO;AACT;;;;;;;AAQA,SAAgB,MAAM,KAAoB;CACxC,OAAO;AACT;;;;;;;AAQA,SAAgB,iBAAiB,KAA+B;CAC9D,OAAO;AACT;;;;;;;AAQA,SAAgB,QAAQ,KAAsB;CAC5C,OAAO;AACT;;;;;;;AAQA,SAAgB,WAAW,KAAyB;CAClD,OAAO;AACT;;;;;;;AAQA,SAAgB,aAAa,KAA2B;CACtD,OAAO;AACT;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAA0B;CACpD,OAAO;AACT"}
@@ -5,22 +5,26 @@
5
5
  */
6
6
  export type { AllowedBucket, AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
7
7
  export { Capability } from './auth.js';
8
- export type { BucketInfo, BucketRetentionPolicy, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
9
- export { BucketRetentionMode, BucketType, CorsOperation } from './bucket.js';
10
- export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaders, } from './download.js';
11
- export type { EncryptionSetting, NoEncryption, NoEncryptionWireSetting, PublicEncryptionSetting, SseB2Setting, SseCCustomerSetting, SseCPublicSetting, } from './encryption.js';
8
+ export type { ComputerBackup, DeleteComputerRequest, DeleteComputerResponse, DeleteComputerResult, ListComputersRequest, ListComputersResponse, ListComputersResult, } from './backup.js';
9
+ export type { BucketDefaultRetention, BucketDefaultServerSideEncryption, BucketDefaultServerSideEncryptionSetting, BucketInfo, BucketListType, BucketResponseType, BucketRetentionPolicy, BucketTypesFilter, CorsAllowedOperation, CorsRule, CreateBucketRequest, DeleteBucketRequest, KnownBucketKeyOption, LifecycleRule, ListBucketsRequest, ListBucketsResponse, NoBucketDefaultRetention, ReadableReplicationConfiguration, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
10
+ export { BUCKET_INFO_KEY_MAX_BYTES, BUCKET_INFO_KEY_MIN_BYTES, BUCKET_INFO_KEY_PATTERN, BUCKET_INFO_RESERVED_PREFIX, BUCKET_INFO_VALUES_MAX_BYTES, BucketKeyOption, BucketRetentionMode, BucketType, CORS_ALLOWED_OPERATIONS, CORS_MAX_AGE_SECONDS_MAX, CORS_RULE_MAX_BYTES, CORS_RULE_NAME_MAX_LENGTH, CORS_RULE_NAME_MIN_LENGTH, CORS_RULE_NAME_PATTERN, CORS_RULE_NAME_RESERVED_PREFIX, CORS_RULES_MAX_COUNT, CorsOperation, KnownBucketResponseType, } from './bucket.js';
11
+ export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaderParseIssue, DownloadHeaders, DownloadServerSideEncryption, SseCDownloadSetting, } from './download.js';
12
+ export { DownloadClientUnauthorizedToReadMarker, DownloadHeaderName } from './download.js';
13
+ export type { EncryptionSetting, NoEncryption, NoEncryptionWireSetting, PublicEncryptionSetting, SseB2Setting, SseCCustomerSetting, SseCKeyMaterial, SseCPublicSetting, } from './encryption.js';
12
14
  export { EncryptionAlgorithm, EncryptionKey, EncryptionMode, SSE_B2, SSE_NONE, sseCustomer, } from './encryption.js';
13
15
  export type { B2ErrorCode, B2ErrorResponse, KnownB2ErrorCode } from './errors.js';
14
16
  export { KNOWN_B2_ERROR_CODES } from './errors.js';
15
- export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, } from './file.js';
16
- export { FileAction, MetadataDirective } from './file.js';
17
- export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, FileId, KeyId, LargeFileId, UploadAuthToken, UploadUrl, } from './ids.js';
18
- export { accountId, applicationKeyId, bucketId, fileId, keyId, largeFileId } from './ids.js';
17
+ export type { ConcreteFileAction, CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileNameListEntry, FileVersion, FileVersionListEntry, FolderFileVersion, GetFileInfoRequest, HideFileRequest, ListedConcreteFileVersion, ListedFileAction, ListedFileVersion, ListedHideFileVersion, ListFileNamesMaybeDelimiterRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileNamesWithDelimiterRequest, ListFileNamesWithDelimiterResponse, ListFileVersionsMaybeDelimiterRequest, ListFileVersionsRequest, ListFileVersionsResponse, ListFileVersionsWithDelimiterRequest, ListFileVersionsWithDelimiterResponse, ReplicationStatus, } from './file.js';
18
+ export { FileAction, HIDE_MARKER_CONTENT_TYPE, MetadataDirective } from './file.js';
19
+ export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, ComputerId, FileId, GroupId, KeyId, LargeFileId, PartnerToken, UploadAuthToken, UploadUrl, } from './ids.js';
20
+ export { accountId, applicationKeyId, bucketId, computerId, fileId, groupId, keyId, largeFileId, partnerToken, } from './ids.js';
19
21
  export type { ApplicationKey, CreateKeyBucketScope, CreateKeyOptions, CreateKeyOptionsBase, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
20
- export type { FileRetentionValue, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
22
+ export type { FileRetentionValue, ReadableFileRetention, ReadableLegalHold, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
21
23
  export { LegalHoldValue, RetentionMode } from './lock.js';
22
- export type { EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
23
- export { EventType } from './notifications.js';
24
+ export type { EventNotificationCustomHeader, EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
25
+ export { EventType, notificationCustomHeadersToRecord, recordToNotificationCustomHeaders, } from './notifications.js';
26
+ export type { CreateGroupMemberRequest, CreateGroupMemberResponse, CreateGroupMemberResult, EjectGroupMemberRequest, EjectGroupMemberResponse, EjectGroupMemberResult, ListedGroupMember, ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersResult, ListGroupsRequest, ListGroupsResponse, ListGroupsResult, PartnerAccountStandingDetails, PartnerApiInfo, PartnerAuthorizeResponse, PartnerB2Stats, PartnerBackupApiInfo, PartnerGroup, PartnerGroupMember, PartnerGroupStats, PartnerGroupsApiInfo, PartnerStorageApiInfo, ReserveTrialCreateAccountRequest, ReserveTrialCreateAccountRequestEntry, ReserveTrialCreateAccountResponse, ReserveTrialCreateAccountResult, } from './partner.js';
27
+ export { PartnerCapability, Region } from './partner.js';
24
28
  export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.js';
25
- export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, ReadableFileRetention, ReadableLegalHold, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UnfinishedLargeFileMetadata, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
29
+ export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UnfinishedLargeFileMetadata, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
26
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC5E,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM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AAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,sBAAsB,EACtB,iCAAiC,EACjC,wCAAwC,EACxC,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,gCAAgC,EAChC,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAIpB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EA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YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACxD,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,QAAQ,EACR,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAA"}
@@ -5,22 +5,26 @@
5
5
  */
6
6
  export type { AllowedBucket, AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
7
7
  export { Capability } from './auth.js';
8
- export type { BucketInfo, BucketRetentionPolicy, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
9
- export { BucketRetentionMode, BucketType, CorsOperation } from './bucket.js';
10
- export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaders, } from './download.js';
11
- export type { EncryptionSetting, NoEncryption, NoEncryptionWireSetting, PublicEncryptionSetting, SseB2Setting, SseCCustomerSetting, SseCPublicSetting, } from './encryption.js';
8
+ export type { ComputerBackup, DeleteComputerRequest, DeleteComputerResponse, DeleteComputerResult, ListComputersRequest, ListComputersResponse, ListComputersResult, } from './backup.js';
9
+ export type { BucketDefaultRetention, BucketDefaultServerSideEncryption, BucketDefaultServerSideEncryptionSetting, BucketInfo, BucketListType, BucketResponseType, BucketRetentionPolicy, BucketTypesFilter, CorsAllowedOperation, CorsRule, CreateBucketRequest, DeleteBucketRequest, KnownBucketKeyOption, LifecycleRule, ListBucketsRequest, ListBucketsResponse, NoBucketDefaultRetention, ReadableReplicationConfiguration, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
10
+ export { BUCKET_INFO_KEY_MAX_BYTES, BUCKET_INFO_KEY_MIN_BYTES, BUCKET_INFO_KEY_PATTERN, BUCKET_INFO_RESERVED_PREFIX, BUCKET_INFO_VALUES_MAX_BYTES, BucketKeyOption, BucketRetentionMode, BucketType, CORS_ALLOWED_OPERATIONS, CORS_MAX_AGE_SECONDS_MAX, CORS_RULE_MAX_BYTES, CORS_RULE_NAME_MAX_LENGTH, CORS_RULE_NAME_MIN_LENGTH, CORS_RULE_NAME_PATTERN, CORS_RULE_NAME_RESERVED_PREFIX, CORS_RULES_MAX_COUNT, CorsOperation, KnownBucketResponseType, } from './bucket.js';
11
+ export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaderParseIssue, DownloadHeaders, DownloadServerSideEncryption, SseCDownloadSetting, } from './download.js';
12
+ export { DownloadClientUnauthorizedToReadMarker, DownloadHeaderName } from './download.js';
13
+ export type { EncryptionSetting, NoEncryption, NoEncryptionWireSetting, PublicEncryptionSetting, SseB2Setting, SseCCustomerSetting, SseCKeyMaterial, SseCPublicSetting, } from './encryption.js';
12
14
  export { EncryptionAlgorithm, EncryptionKey, EncryptionMode, SSE_B2, SSE_NONE, sseCustomer, } from './encryption.js';
13
15
  export type { B2ErrorCode, B2ErrorResponse, KnownB2ErrorCode } from './errors.js';
14
16
  export { KNOWN_B2_ERROR_CODES } from './errors.js';
15
- export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, } from './file.js';
16
- export { FileAction, MetadataDirective } from './file.js';
17
- export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, FileId, KeyId, LargeFileId, UploadAuthToken, UploadUrl, } from './ids.js';
18
- export { accountId, applicationKeyId, bucketId, fileId, keyId, largeFileId } from './ids.js';
17
+ export type { ConcreteFileAction, CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileNameListEntry, FileVersion, FileVersionListEntry, FolderFileVersion, GetFileInfoRequest, HideFileRequest, ListedConcreteFileVersion, ListedFileAction, ListedFileVersion, ListedHideFileVersion, ListFileNamesMaybeDelimiterRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileNamesWithDelimiterRequest, ListFileNamesWithDelimiterResponse, ListFileVersionsMaybeDelimiterRequest, ListFileVersionsRequest, ListFileVersionsResponse, ListFileVersionsWithDelimiterRequest, ListFileVersionsWithDelimiterResponse, ReplicationStatus, } from './file.js';
18
+ export { FileAction, HIDE_MARKER_CONTENT_TYPE, MetadataDirective } from './file.js';
19
+ export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, ComputerId, FileId, GroupId, KeyId, LargeFileId, PartnerToken, UploadAuthToken, UploadUrl, } from './ids.js';
20
+ export { accountId, applicationKeyId, bucketId, computerId, fileId, groupId, keyId, largeFileId, partnerToken, } from './ids.js';
19
21
  export type { ApplicationKey, CreateKeyBucketScope, CreateKeyOptions, CreateKeyOptionsBase, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
20
- export type { FileRetentionValue, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
22
+ export type { FileRetentionValue, ReadableFileRetention, ReadableLegalHold, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
21
23
  export { LegalHoldValue, RetentionMode } from './lock.js';
22
- export type { EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
23
- export { EventType } from './notifications.js';
24
+ export type { EventNotificationCustomHeader, EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
25
+ export { EventType, notificationCustomHeadersToRecord, recordToNotificationCustomHeaders, } from './notifications.js';
26
+ export type { CreateGroupMemberRequest, CreateGroupMemberResponse, CreateGroupMemberResult, EjectGroupMemberRequest, EjectGroupMemberResponse, EjectGroupMemberResult, ListedGroupMember, ListGroupMembersRequest, ListGroupMembersResponse, ListGroupMembersResult, ListGroupsRequest, ListGroupsResponse, ListGroupsResult, PartnerAccountStandingDetails, PartnerApiInfo, PartnerAuthorizeResponse, PartnerB2Stats, PartnerBackupApiInfo, PartnerGroup, PartnerGroupMember, PartnerGroupStats, PartnerGroupsApiInfo, PartnerStorageApiInfo, ReserveTrialCreateAccountRequest, ReserveTrialCreateAccountRequestEntry, ReserveTrialCreateAccountResponse, ReserveTrialCreateAccountResult, } from './partner.js';
27
+ export { PartnerCapability, Region } from './partner.js';
24
28
  export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.js';
25
- export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, ReadableFileRetention, ReadableLegalHold, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UnfinishedLargeFileMetadata, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
29
+ export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UnfinishedLargeFileMetadata, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
26
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC5E,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,MAAM,EACN,QAAQ,EACR,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,gB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,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,sBAAsB,EACtB,iCAAiC,EACjC,wCAAwC,EACxC,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,gCAAgC,EAChC,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAIpB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,E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iB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACxD,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,QAAQ,EACR,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { Capability } from './auth.js';
2
+ import { BucketKeyOption } from './bucket.js';
2
3
  import { AccountId, ApplicationKeyId, BucketId } from './ids.js';
3
4
  /** Shared request parameters for creating an application key. */
4
5
  export interface CreateKeyOptionsBase {
@@ -66,7 +67,7 @@ export interface FullApplicationKey {
66
67
  /** File name prefix this key is restricted to, or null if unrestricted. */
67
68
  readonly namePrefix: string | null;
68
69
  /** Set of options enabled on this key. */
69
- readonly options: readonly string[];
70
+ readonly options: readonly BucketKeyOption[];
70
71
  }
71
72
  /**
72
73
  * Application key metadata (without the secret) as returned by `b2_list_keys`.
@@ -94,7 +95,7 @@ export interface ApplicationKey {
94
95
  /** File name prefix this key is restricted to, or null if unrestricted. */
95
96
  readonly namePrefix: string | null;
96
97
  /** Set of options enabled on this key. */
97
- readonly options: readonly string[];
98
+ readonly options: readonly BucketKeyOption[];
98
99
  }
99
100
  /** Request parameters for the `b2_list_keys` API call. */
100
101
  export interface ListKeysRequest {
@@ -102,7 +103,7 @@ export interface ListKeysRequest {
102
103
  readonly accountId: AccountId;
103
104
  /** Maximum number of keys to return per request. */
104
105
  readonly maxKeyCount?: number;
105
- /** Application key ID to start listing from (exclusive). Used for pagination. */
106
+ /** Application key ID to start listing at, usually from `nextApplicationKeyId`. */
106
107
  readonly startApplicationKeyId?: ApplicationKeyId;
107
108
  }
108
109
  /** Response from the `b2_list_keys` API call. */
@@ -1 +1 @@
1
- {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../src/types/key.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErE,iEAAiE;AACjE,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,CAAA;IAC5C,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;IACxC,6GAA6G;IAC7G,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,+DAA+D;AAC/D,MAAM,MAAM,oBAAoB,GAC5B;IACE;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAA;IAC/C,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAC1B,GACD;IACE;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAA;CAC3B,CAAA;AAEL,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,oBAAoB,CAAA;AAE1E,0FAA0F;AAC1F,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAC9B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;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BAAgB,EAAE,gBAAgB,CAAA;CAC5C"}
@@ -1,4 +1,5 @@
1
1
  import { Capability } from './auth.js';
2
+ import { BucketKeyOption } from './bucket.js';
2
3
  import { AccountId, ApplicationKeyId, BucketId } from './ids.js';
3
4
  /** Shared request parameters for creating an application key. */
4
5
  export interface CreateKeyOptionsBase {
@@ -66,7 +67,7 @@ export interface FullApplicationKey {
66
67
  /** File name prefix this key is restricted to, or null if unrestricted. */
67
68
  readonly namePrefix: string | null;
68
69
  /** Set of options enabled on this key. */
69
- readonly options: readonly string[];
70
+ readonly options: readonly BucketKeyOption[];
70
71
  }
71
72
  /**
72
73
  * Application key metadata (without the secret) as returned by `b2_list_keys`.
@@ -94,7 +95,7 @@ export interface ApplicationKey {
94
95
  /** File name prefix this key is restricted to, or null if unrestricted. */
95
96
  readonly namePrefix: string | null;
96
97
  /** Set of options enabled on this key. */
97
- readonly options: readonly string[];
98
+ readonly options: readonly BucketKeyOption[];
98
99
  }
99
100
  /** Request parameters for the `b2_list_keys` API call. */
100
101
  export interface ListKeysRequest {
@@ -102,7 +103,7 @@ export interface ListKeysRequest {
102
103
  readonly accountId: AccountId;
103
104
  /** Maximum number of keys to return per request. */
104
105
  readonly maxKeyCount?: number;
105
- /** Application key ID to start listing from (exclusive). Used for pagination. */
106
+ /** Application key ID to start listing at, usually from `nextApplicationKeyId`. */
106
107
  readonly startApplicationKeyId?: ApplicationKeyId;
107
108
  }
108
109
  /** Response from the `b2_list_keys` API call. */
@@ -1 +1 @@
1
- {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../src/types/key.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErE,iEAAiE;AACjE,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,EAAE,SAAS,UAAU,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AI,CAAA;IAC3C,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAA;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;CAC7C;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAA;CAClD;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,CAAA;IACxC,2FAA2F;IAC3F,QAAQ,CAAC,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvD;AAED,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAA;CAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"lock.cjs","names":[],"sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,gBAAgB;;CAE3B,YAAY;;CAEZ,YAAY;AACd;;;;;;;;;AAaA,IAAa,iBAAiB;;CAE5B,IAAI;;CAEJ,KAAK;AACP"}
1
+ {"version":3,"file":"lock.cjs","names":[],"sources":["../../src/types/lock.ts"],"sourcesContent":["import type { FileId } from './ids.ts'\n\n/**\n * Named constants for the file-level Object Lock retention mode.\n *\n * @example\n * ```ts\n * await object.setRetention(fileId, {\n * mode: RetentionMode.Compliance,\n * retainUntilTimestamp: Date.now() + 86_400_000,\n * })\n * ```\n */\nexport const RetentionMode = {\n /** Locked: cannot be deleted or modified until `retainUntilTimestamp`, even by the account owner. */\n Compliance: 'compliance',\n /** Locked: can be shortened by callers holding the `bypassGovernance` capability. */\n Governance: 'governance',\n} as const\n\n/** File-level Object Lock retention mode. Derived from {@link RetentionMode}. */\nexport type RetentionMode = (typeof RetentionMode)[keyof typeof RetentionMode]\n\n/**\n * Named constants for the file legal-hold status.\n *\n * @example\n * ```ts\n * await object.setLegalHold(fileId, LegalHoldValue.On)\n * ```\n */\nexport const LegalHoldValue = {\n /** Apply the legal hold. */\n On: 'on',\n /** Remove the legal hold. */\n Off: 'off',\n} as const\n\n/** Legal hold status for a file. Derived from {@link LegalHoldValue}. */\nexport type LegalHoldValue = (typeof LegalHoldValue)[keyof typeof LegalHoldValue]\n\n/** Retention settings for a specific file version under Object Lock. */\nexport interface FileRetentionValue {\n /** Retention mode, or null if no retention is set. */\n readonly mode: RetentionMode | null\n /** UTC timestamp (milliseconds) until which the file is retained, or null if not set. */\n readonly retainUntilTimestamp: number | null\n}\n\n/** Object Lock retention settings as returned by readable B2 response metadata. */\nexport interface ReadableFileRetention {\n /** Whether the caller is authorized to read retention settings. */\n readonly isClientAuthorizedToRead: boolean\n /** Retention settings, or null when none are set or unreadable. */\n readonly value: FileRetentionValue | null\n}\n\n/** Legal hold status as returned by readable B2 response metadata. */\nexport interface ReadableLegalHold {\n /** Whether the caller is authorized to read legal hold status. */\n readonly isClientAuthorizedToRead: boolean\n /** Legal hold value, or null when none is set or unreadable. */\n readonly value: LegalHoldValue | null\n}\n\n/**\n * Request parameters for the `b2_update_file_retention` API call.\n * Updates the Object Lock retention settings on a file version.\n */\nexport interface UpdateFileRetentionRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New retention settings for the file. */\n readonly fileRetention: FileRetentionValue\n /**\n * When `true`, allows shortening a governance-mode retention period. Requires\n * the `bypassGovernance` capability on the application key. Has no effect on\n * compliance-mode retention.\n */\n readonly bypassGovernance?: boolean\n}\n\n/**\n * Request parameters for the `b2_update_file_legal_hold` API call.\n * Updates the legal hold status on a file version.\n */\nexport interface UpdateFileLegalHoldRequest {\n /** Name of the file to update. */\n readonly fileName: string\n /** ID of the file version to update. */\n readonly fileId: FileId\n /** New legal hold status: `'on'` or `'off'`. */\n readonly legalHold: LegalHoldValue\n}\n\n/** Response from the `b2_update_file_retention` API call. */\nexport interface UpdateFileRetentionResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Retention settings as applied. */\n readonly fileRetention: FileRetentionValue\n}\n\n/** Response from the `b2_update_file_legal_hold` API call. */\nexport interface UpdateFileLegalHoldResponse {\n /** Name of the updated file. */\n readonly fileName: string\n /** ID of the updated file version. */\n readonly fileId: FileId\n /** Legal hold status as applied. */\n readonly legalHold: LegalHoldValue\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,gBAAgB;;CAE3B,YAAY;;CAEZ,YAAY;AACd;;;;;;;;;AAaA,IAAa,iBAAiB;;CAE5B,IAAI;;CAEJ,KAAK;AACP"}