@backblaze-labs/b2-sdk 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (885) hide show
  1. package/CHANGELOG.md +151 -5
  2. package/README.md +163 -34
  3. package/dist/_virtual/_b2-sdk-version-json.cjs +4 -0
  4. package/dist/_virtual/_b2-sdk-version-json.js +4 -0
  5. package/dist/auth/account-info.d.cts +32 -0
  6. package/dist/auth/account-info.d.cts.map +1 -1
  7. package/dist/auth/account-info.d.ts +32 -0
  8. package/dist/auth/account-info.d.ts.map +1 -1
  9. package/dist/auth/file.cjs +408 -207
  10. package/dist/auth/file.cjs.map +1 -1
  11. package/dist/auth/file.d.cts +77 -3
  12. package/dist/auth/file.d.cts.map +1 -1
  13. package/dist/auth/file.d.ts +77 -3
  14. package/dist/auth/file.d.ts.map +1 -1
  15. package/dist/auth/file.js +407 -207
  16. package/dist/auth/file.js.map +1 -1
  17. package/dist/auth/in-memory.cjs +212 -183
  18. package/dist/auth/in-memory.cjs.map +1 -1
  19. package/dist/auth/in-memory.d.cts +8 -0
  20. package/dist/auth/in-memory.d.cts.map +1 -1
  21. package/dist/auth/in-memory.d.ts +8 -0
  22. package/dist/auth/in-memory.d.ts.map +1 -1
  23. package/dist/auth/in-memory.js +211 -182
  24. package/dist/auth/in-memory.js.map +1 -1
  25. package/dist/auth/index.cjs +7 -9
  26. package/dist/auth/index.d.cts +3 -2
  27. package/dist/auth/index.d.cts.map +1 -1
  28. package/dist/auth/index.d.ts +3 -2
  29. package/dist/auth/index.d.ts.map +1 -1
  30. package/dist/auth/index.js +2 -8
  31. package/dist/auth/realms.cjs +80 -7
  32. package/dist/auth/realms.cjs.map +1 -1
  33. package/dist/auth/realms.d.cts +27 -4
  34. package/dist/auth/realms.d.cts.map +1 -1
  35. package/dist/auth/realms.d.ts +27 -4
  36. package/dist/auth/realms.d.ts.map +1 -1
  37. package/dist/auth/realms.js +80 -9
  38. package/dist/auth/realms.js.map +1 -1
  39. package/dist/auth/upload-url-pool.cjs +55 -51
  40. package/dist/auth/upload-url-pool.cjs.map +1 -1
  41. package/dist/auth/upload-url-pool.js +55 -51
  42. package/dist/auth/upload-url-pool.js.map +1 -1
  43. package/dist/backup/client.cjs +206 -0
  44. package/dist/backup/client.cjs.map +1 -0
  45. package/dist/backup/client.d.cts +238 -0
  46. package/dist/backup/client.d.cts.map +1 -0
  47. package/dist/backup/client.d.ts +238 -0
  48. package/dist/backup/client.d.ts.map +1 -0
  49. package/dist/backup/client.js +206 -0
  50. package/dist/backup/client.js.map +1 -0
  51. package/dist/backup/index.cjs +15 -0
  52. package/dist/backup/index.d.cts +22 -0
  53. package/dist/backup/index.d.cts.map +1 -0
  54. package/dist/backup/index.d.ts +22 -0
  55. package/dist/backup/index.d.ts.map +1 -0
  56. package/dist/backup/index.js +7 -0
  57. package/dist/backup/raw.cjs +146 -0
  58. package/dist/backup/raw.cjs.map +1 -0
  59. package/dist/backup/raw.d.cts +122 -0
  60. package/dist/backup/raw.d.cts.map +1 -0
  61. package/dist/backup/raw.d.ts +122 -0
  62. package/dist/backup/raw.d.ts.map +1 -0
  63. package/dist/backup/raw.js +146 -0
  64. package/dist/backup/raw.js.map +1 -0
  65. package/dist/bucket.cjs +786 -787
  66. package/dist/bucket.cjs.map +1 -1
  67. package/dist/bucket.d.cts +35 -47
  68. package/dist/bucket.d.cts.map +1 -1
  69. package/dist/bucket.d.ts +35 -47
  70. package/dist/bucket.d.ts.map +1 -1
  71. package/dist/bucket.js +781 -782
  72. package/dist/bucket.js.map +1 -1
  73. package/dist/client.cjs +246 -228
  74. package/dist/client.cjs.map +1 -1
  75. package/dist/client.d.cts +25 -17
  76. package/dist/client.d.cts.map +1 -1
  77. package/dist/client.d.ts +25 -17
  78. package/dist/client.d.ts.map +1 -1
  79. package/dist/client.js +243 -225
  80. package/dist/client.js.map +1 -1
  81. package/dist/copy/large.cjs +116 -71
  82. package/dist/copy/large.cjs.map +1 -1
  83. package/dist/copy/large.d.cts +6 -0
  84. package/dist/copy/large.d.cts.map +1 -1
  85. package/dist/copy/large.d.ts +6 -0
  86. package/dist/copy/large.d.ts.map +1 -1
  87. package/dist/copy/large.js +114 -69
  88. package/dist/copy/large.js.map +1 -1
  89. package/dist/download/checksum.cjs +93 -0
  90. package/dist/download/checksum.cjs.map +1 -0
  91. package/dist/download/checksum.d.cts +40 -0
  92. package/dist/download/checksum.d.cts.map +1 -0
  93. package/dist/download/checksum.d.ts +40 -0
  94. package/dist/download/checksum.d.ts.map +1 -0
  95. package/dist/download/checksum.js +91 -0
  96. package/dist/download/checksum.js.map +1 -0
  97. package/dist/download/parallel.cjs +251 -118
  98. package/dist/download/parallel.cjs.map +1 -1
  99. package/dist/download/parallel.d.cts +13 -2
  100. package/dist/download/parallel.d.cts.map +1 -1
  101. package/dist/download/parallel.d.ts +13 -2
  102. package/dist/download/parallel.d.ts.map +1 -1
  103. package/dist/download/parallel.js +249 -116
  104. package/dist/download/parallel.js.map +1 -1
  105. package/dist/download/single.cjs +323 -97
  106. package/dist/download/single.cjs.map +1 -1
  107. package/dist/download/single.d.cts +6 -1
  108. package/dist/download/single.d.cts.map +1 -1
  109. package/dist/download/single.d.ts +6 -1
  110. package/dist/download/single.d.ts.map +1 -1
  111. package/dist/download/single.js +322 -99
  112. package/dist/download/single.js.map +1 -1
  113. package/dist/errors/index.cjs +869 -243
  114. package/dist/errors/index.cjs.map +1 -1
  115. package/dist/errors/index.d.cts +404 -82
  116. package/dist/errors/index.d.cts.map +1 -1
  117. package/dist/errors/index.d.ts +404 -82
  118. package/dist/errors/index.d.ts.map +1 -1
  119. package/dist/errors/index.js +835 -261
  120. package/dist/errors/index.js.map +1 -1
  121. package/dist/http/retry.cjs +45 -28
  122. package/dist/http/retry.cjs.map +1 -1
  123. package/dist/http/retry.d.cts +15 -2
  124. package/dist/http/retry.d.cts.map +1 -1
  125. package/dist/http/retry.d.ts +15 -2
  126. package/dist/http/retry.d.ts.map +1 -1
  127. package/dist/http/retry.js +46 -31
  128. package/dist/http/retry.js.map +1 -1
  129. package/dist/http/transport.cjs +476 -140
  130. package/dist/http/transport.cjs.map +1 -1
  131. package/dist/http/transport.d.cts +46 -5
  132. package/dist/http/transport.d.cts.map +1 -1
  133. package/dist/http/transport.d.ts +46 -5
  134. package/dist/http/transport.d.ts.map +1 -1
  135. package/dist/http/transport.js +474 -140
  136. package/dist/http/transport.js.map +1 -1
  137. package/dist/http/url-guard.cjs +154 -89
  138. package/dist/http/url-guard.cjs.map +1 -1
  139. package/dist/http/url-guard.d.cts +25 -3
  140. package/dist/http/url-guard.d.cts.map +1 -1
  141. package/dist/http/url-guard.d.ts +25 -3
  142. package/dist/http/url-guard.d.ts.map +1 -1
  143. package/dist/http/url-guard.js +152 -90
  144. package/dist/http/url-guard.js.map +1 -1
  145. package/dist/http/user-agent.cjs +84 -44
  146. package/dist/http/user-agent.cjs.map +1 -1
  147. package/dist/http/user-agent.js +84 -46
  148. package/dist/http/user-agent.js.map +1 -1
  149. package/dist/index.cjs +124 -77
  150. package/dist/index.d.cts +29 -21
  151. package/dist/index.d.cts.map +1 -1
  152. package/dist/index.d.ts +29 -21
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +18 -72
  155. package/dist/internal/b2-naming.cjs +66 -0
  156. package/dist/internal/b2-naming.cjs.map +1 -0
  157. package/dist/internal/b2-naming.d.cts +43 -0
  158. package/dist/internal/b2-naming.d.cts.map +1 -0
  159. package/dist/internal/b2-naming.d.ts +43 -0
  160. package/dist/internal/b2-naming.d.ts.map +1 -0
  161. package/dist/internal/b2-naming.js +60 -0
  162. package/dist/internal/b2-naming.js.map +1 -0
  163. package/dist/internal/upload-retry-options.cjs +21 -0
  164. package/dist/internal/upload-retry-options.cjs.map +1 -0
  165. package/dist/internal/upload-retry-options.d.cts +12 -0
  166. package/dist/internal/upload-retry-options.d.cts.map +1 -0
  167. package/dist/internal/upload-retry-options.d.ts +12 -0
  168. package/dist/internal/upload-retry-options.d.ts.map +1 -0
  169. package/dist/internal/upload-retry-options.js +21 -0
  170. package/dist/internal/upload-retry-options.js.map +1 -0
  171. package/dist/internal/url-redaction.cjs +31 -0
  172. package/dist/internal/url-redaction.cjs.map +1 -0
  173. package/dist/internal/url-redaction.d.cts +17 -0
  174. package/dist/internal/url-redaction.d.cts.map +1 -0
  175. package/dist/internal/url-redaction.d.ts +17 -0
  176. package/dist/internal/url-redaction.d.ts.map +1 -0
  177. package/dist/internal/url-redaction.js +31 -0
  178. package/dist/internal/url-redaction.js.map +1 -0
  179. package/dist/notifications/index.cjs +4 -6
  180. package/dist/notifications/index.d.cts +1 -1
  181. package/dist/notifications/index.d.cts.map +1 -1
  182. package/dist/notifications/index.d.ts +1 -1
  183. package/dist/notifications/index.d.ts.map +1 -1
  184. package/dist/notifications/index.js +1 -6
  185. package/dist/notifications/webhook.cjs +195 -85
  186. package/dist/notifications/webhook.cjs.map +1 -1
  187. package/dist/notifications/webhook.d.cts.map +1 -1
  188. package/dist/notifications/webhook.d.ts.map +1 -1
  189. package/dist/notifications/webhook.js +195 -87
  190. package/dist/notifications/webhook.js.map +1 -1
  191. package/dist/object.cjs +253 -210
  192. package/dist/object.cjs.map +1 -1
  193. package/dist/object.d.cts +13 -57
  194. package/dist/object.d.cts.map +1 -1
  195. package/dist/object.d.ts +13 -57
  196. package/dist/object.d.ts.map +1 -1
  197. package/dist/object.js +249 -206
  198. package/dist/object.js.map +1 -1
  199. package/dist/partner/account-info.d.cts +43 -0
  200. package/dist/partner/account-info.d.cts.map +1 -0
  201. package/dist/partner/account-info.d.ts +43 -0
  202. package/dist/partner/account-info.d.ts.map +1 -0
  203. package/dist/partner/auth-clone.cjs +64 -0
  204. package/dist/partner/auth-clone.cjs.map +1 -0
  205. package/dist/partner/auth-clone.d.cts +27 -0
  206. package/dist/partner/auth-clone.d.cts.map +1 -0
  207. package/dist/partner/auth-clone.d.ts +27 -0
  208. package/dist/partner/auth-clone.d.ts.map +1 -0
  209. package/dist/partner/auth-clone.js +63 -0
  210. package/dist/partner/auth-clone.js.map +1 -0
  211. package/dist/partner/auth-core.cjs +175 -0
  212. package/dist/partner/auth-core.cjs.map +1 -0
  213. package/dist/partner/auth-core.d.cts +111 -0
  214. package/dist/partner/auth-core.d.cts.map +1 -0
  215. package/dist/partner/auth-core.d.ts +111 -0
  216. package/dist/partner/auth-core.d.ts.map +1 -0
  217. package/dist/partner/auth-core.js +175 -0
  218. package/dist/partner/auth-core.js.map +1 -0
  219. package/dist/partner/auth-shape.cjs +36 -0
  220. package/dist/partner/auth-shape.cjs.map +1 -0
  221. package/dist/partner/auth-shape.d.cts +12 -0
  222. package/dist/partner/auth-shape.d.cts.map +1 -0
  223. package/dist/partner/auth-shape.d.ts +12 -0
  224. package/dist/partner/auth-shape.d.ts.map +1 -0
  225. package/dist/partner/auth-shape.js +36 -0
  226. package/dist/partner/auth-shape.js.map +1 -0
  227. package/dist/partner/client.cjs +255 -0
  228. package/dist/partner/client.cjs.map +1 -0
  229. package/dist/partner/client.d.cts +335 -0
  230. package/dist/partner/client.d.cts.map +1 -0
  231. package/dist/partner/client.d.ts +335 -0
  232. package/dist/partner/client.d.ts.map +1 -0
  233. package/dist/partner/client.js +255 -0
  234. package/dist/partner/client.js.map +1 -0
  235. package/dist/partner/endpoint-url.cjs +108 -0
  236. package/dist/partner/endpoint-url.cjs.map +1 -0
  237. package/dist/partner/endpoint-url.d.cts +72 -0
  238. package/dist/partner/endpoint-url.d.cts.map +1 -0
  239. package/dist/partner/endpoint-url.d.ts +72 -0
  240. package/dist/partner/endpoint-url.d.ts.map +1 -0
  241. package/dist/partner/endpoint-url.js +105 -0
  242. package/dist/partner/endpoint-url.js.map +1 -0
  243. package/dist/partner/in-memory.cjs +135 -0
  244. package/dist/partner/in-memory.cjs.map +1 -0
  245. package/dist/partner/in-memory.d.cts +99 -0
  246. package/dist/partner/in-memory.d.cts.map +1 -0
  247. package/dist/partner/in-memory.d.ts +99 -0
  248. package/dist/partner/in-memory.d.ts.map +1 -0
  249. package/dist/partner/in-memory.js +135 -0
  250. package/dist/partner/in-memory.js.map +1 -0
  251. package/dist/partner/index.cjs +18 -0
  252. package/dist/partner/index.d.cts +23 -0
  253. package/dist/partner/index.d.cts.map +1 -0
  254. package/dist/partner/index.d.ts +23 -0
  255. package/dist/partner/index.d.ts.map +1 -0
  256. package/dist/partner/index.js +7 -0
  257. package/dist/partner/raw.cjs +392 -0
  258. package/dist/partner/raw.cjs.map +1 -0
  259. package/dist/partner/raw.d.cts +223 -0
  260. package/dist/partner/raw.d.cts.map +1 -0
  261. package/dist/partner/raw.d.ts +223 -0
  262. package/dist/partner/raw.d.ts.map +1 -0
  263. package/dist/partner/raw.js +390 -0
  264. package/dist/partner/raw.js.map +1 -0
  265. package/dist/partner/redaction-placeholders.cjs +10 -0
  266. package/dist/partner/redaction-placeholders.cjs.map +1 -0
  267. package/dist/partner/redaction-placeholders.d.cts +5 -0
  268. package/dist/partner/redaction-placeholders.d.cts.map +1 -0
  269. package/dist/partner/redaction-placeholders.d.ts +5 -0
  270. package/dist/partner/redaction-placeholders.d.ts.map +1 -0
  271. package/dist/partner/redaction-placeholders.js +9 -0
  272. package/dist/partner/redaction-placeholders.js.map +1 -0
  273. package/dist/partner/redaction.cjs +267 -0
  274. package/dist/partner/redaction.cjs.map +1 -0
  275. package/dist/partner/redaction.d.cts +124 -0
  276. package/dist/partner/redaction.d.cts.map +1 -0
  277. package/dist/partner/redaction.d.ts +124 -0
  278. package/dist/partner/redaction.d.ts.map +1 -0
  279. package/dist/partner/redaction.js +257 -0
  280. package/dist/partner/redaction.js.map +1 -0
  281. package/dist/raw/encoding.cjs +74 -35
  282. package/dist/raw/encoding.cjs.map +1 -1
  283. package/dist/raw/encoding.js +74 -38
  284. package/dist/raw/encoding.js.map +1 -1
  285. package/dist/raw/index.cjs +740 -587
  286. package/dist/raw/index.cjs.map +1 -1
  287. package/dist/raw/index.d.cts +126 -19
  288. package/dist/raw/index.d.cts.map +1 -1
  289. package/dist/raw/index.d.ts +126 -19
  290. package/dist/raw/index.d.ts.map +1 -1
  291. package/dist/raw/index.js +736 -589
  292. package/dist/raw/index.js.map +1 -1
  293. package/dist/raw/url.cjs +111 -0
  294. package/dist/raw/url.cjs.map +1 -0
  295. package/dist/raw/url.d.cts +41 -0
  296. package/dist/raw/url.d.cts.map +1 -0
  297. package/dist/raw/url.d.ts +41 -0
  298. package/dist/raw/url.d.ts.map +1 -0
  299. package/dist/raw/url.js +110 -0
  300. package/dist/raw/url.js.map +1 -0
  301. package/dist/s3/index.cjs +355 -18
  302. package/dist/s3/index.cjs.map +1 -1
  303. package/dist/s3/index.d.cts +233 -5
  304. package/dist/s3/index.d.cts.map +1 -1
  305. package/dist/s3/index.d.ts +233 -5
  306. package/dist/s3/index.d.ts.map +1 -1
  307. package/dist/s3/index.js +351 -22
  308. package/dist/s3/index.js.map +1 -1
  309. package/dist/s3/sigv4.cjs +154 -0
  310. package/dist/s3/sigv4.cjs.map +1 -0
  311. package/dist/s3/sigv4.d.cts +43 -0
  312. package/dist/s3/sigv4.d.cts.map +1 -0
  313. package/dist/s3/sigv4.d.ts +43 -0
  314. package/dist/s3/sigv4.d.ts.map +1 -0
  315. package/dist/s3/sigv4.js +153 -0
  316. package/dist/s3/sigv4.js.map +1 -0
  317. package/dist/s3/validation.cjs +69 -0
  318. package/dist/s3/validation.cjs.map +1 -0
  319. package/dist/s3/validation.d.cts +43 -0
  320. package/dist/s3/validation.d.cts.map +1 -0
  321. package/dist/s3/validation.d.ts +43 -0
  322. package/dist/s3/validation.d.ts.map +1 -0
  323. package/dist/s3/validation.js +66 -0
  324. package/dist/s3/validation.js.map +1 -0
  325. package/dist/simulator/capabilities.cjs +63 -48
  326. package/dist/simulator/capabilities.cjs.map +1 -1
  327. package/dist/simulator/capabilities.js +63 -49
  328. package/dist/simulator/capabilities.js.map +1 -1
  329. package/dist/simulator/index.cjs +3114 -1547
  330. package/dist/simulator/index.cjs.map +1 -1
  331. package/dist/simulator/index.d.cts +186 -20
  332. package/dist/simulator/index.d.cts.map +1 -1
  333. package/dist/simulator/index.d.ts +186 -20
  334. package/dist/simulator/index.d.ts.map +1 -1
  335. package/dist/simulator/index.js +3098 -1545
  336. package/dist/simulator/index.js.map +1 -1
  337. package/dist/simulator/partner.cjs +719 -0
  338. package/dist/simulator/partner.cjs.map +1 -0
  339. package/dist/simulator/partner.d.cts +183 -0
  340. package/dist/simulator/partner.d.cts.map +1 -0
  341. package/dist/simulator/partner.d.ts +183 -0
  342. package/dist/simulator/partner.d.ts.map +1 -0
  343. package/dist/simulator/partner.js +718 -0
  344. package/dist/simulator/partner.js.map +1 -0
  345. package/dist/simulator/validation.cjs +772 -157
  346. package/dist/simulator/validation.cjs.map +1 -1
  347. package/dist/simulator/validation.d.cts +120 -21
  348. package/dist/simulator/validation.d.cts.map +1 -1
  349. package/dist/simulator/validation.d.ts +120 -21
  350. package/dist/simulator/validation.d.ts.map +1 -1
  351. package/dist/simulator/validation.js +755 -167
  352. package/dist/simulator/validation.js.map +1 -1
  353. package/dist/streams/collect.cjs +74 -24
  354. package/dist/streams/collect.cjs.map +1 -1
  355. package/dist/streams/collect.d.cts +14 -1
  356. package/dist/streams/collect.d.cts.map +1 -1
  357. package/dist/streams/collect.d.ts +14 -1
  358. package/dist/streams/collect.d.ts.map +1 -1
  359. package/dist/streams/collect.js +74 -25
  360. package/dist/streams/collect.js.map +1 -1
  361. package/dist/streams/file-source.cjs +287 -0
  362. package/dist/streams/file-source.cjs.map +1 -0
  363. package/dist/streams/file-source.d.cts +96 -0
  364. package/dist/streams/file-source.d.cts.map +1 -0
  365. package/dist/streams/file-source.d.ts +96 -0
  366. package/dist/streams/file-source.d.ts.map +1 -0
  367. package/dist/streams/file-source.js +286 -0
  368. package/dist/streams/file-source.js.map +1 -0
  369. package/dist/streams/hash.cjs +207 -115
  370. package/dist/streams/hash.cjs.map +1 -1
  371. package/dist/streams/hash.d.cts +5 -4
  372. package/dist/streams/hash.d.cts.map +1 -1
  373. package/dist/streams/hash.d.ts +5 -4
  374. package/dist/streams/hash.d.ts.map +1 -1
  375. package/dist/streams/hash.js +208 -95
  376. package/dist/streams/hash.js.map +1 -1
  377. package/dist/streams/index.cjs +12 -12
  378. package/dist/streams/index.d.cts +3 -3
  379. package/dist/streams/index.d.cts.map +1 -1
  380. package/dist/streams/index.d.ts +3 -3
  381. package/dist/streams/index.d.ts.map +1 -1
  382. package/dist/streams/index.js +3 -11
  383. package/dist/streams/progress.cjs +60 -46
  384. package/dist/streams/progress.cjs.map +1 -1
  385. package/dist/streams/progress.js +60 -46
  386. package/dist/streams/progress.js.map +1 -1
  387. package/dist/streams/source.cjs +317 -146
  388. package/dist/streams/source.cjs.map +1 -1
  389. package/dist/streams/source.d.cts +56 -18
  390. package/dist/streams/source.d.cts.map +1 -1
  391. package/dist/streams/source.d.ts +56 -18
  392. package/dist/streams/source.d.ts.map +1 -1
  393. package/dist/streams/source.js +313 -149
  394. package/dist/streams/source.js.map +1 -1
  395. package/dist/sync/actions/index.cjs +236 -184
  396. package/dist/sync/actions/index.cjs.map +1 -1
  397. package/dist/sync/actions/index.d.cts +29 -21
  398. package/dist/sync/actions/index.d.cts.map +1 -1
  399. package/dist/sync/actions/index.d.ts +29 -21
  400. package/dist/sync/actions/index.d.ts.map +1 -1
  401. package/dist/sync/actions/index.js +236 -190
  402. package/dist/sync/actions/index.js.map +1 -1
  403. package/dist/sync/b2-sha1-reader.cjs +152 -0
  404. package/dist/sync/b2-sha1-reader.cjs.map +1 -0
  405. package/dist/sync/b2-sha1-reader.d.cts +58 -0
  406. package/dist/sync/b2-sha1-reader.d.cts.map +1 -0
  407. package/dist/sync/b2-sha1-reader.d.ts +58 -0
  408. package/dist/sync/b2-sha1-reader.d.ts.map +1 -0
  409. package/dist/sync/b2-sha1-reader.js +149 -0
  410. package/dist/sync/b2-sha1-reader.js.map +1 -0
  411. package/dist/sync/download-staging.cjs +266 -0
  412. package/dist/sync/download-staging.cjs.map +1 -0
  413. package/dist/sync/download-staging.d.cts +55 -0
  414. package/dist/sync/download-staging.d.cts.map +1 -0
  415. package/dist/sync/download-staging.d.ts +55 -0
  416. package/dist/sync/download-staging.d.ts.map +1 -0
  417. package/dist/sync/download-staging.js +260 -0
  418. package/dist/sync/download-staging.js.map +1 -0
  419. package/dist/sync/filesystem-errors.cjs +32 -0
  420. package/dist/sync/filesystem-errors.cjs.map +1 -0
  421. package/dist/sync/filesystem-errors.d.cts +8 -0
  422. package/dist/sync/filesystem-errors.d.cts.map +1 -0
  423. package/dist/sync/filesystem-errors.d.ts +8 -0
  424. package/dist/sync/filesystem-errors.d.ts.map +1 -0
  425. package/dist/sync/filesystem-errors.js +32 -0
  426. package/dist/sync/filesystem-errors.js.map +1 -0
  427. package/dist/sync/filters.cjs +217 -0
  428. package/dist/sync/filters.cjs.map +1 -0
  429. package/dist/sync/filters.d.cts +51 -0
  430. package/dist/sync/filters.d.cts.map +1 -0
  431. package/dist/sync/filters.d.ts +51 -0
  432. package/dist/sync/filters.d.ts.map +1 -0
  433. package/dist/sync/filters.js +213 -0
  434. package/dist/sync/filters.js.map +1 -0
  435. package/dist/sync/index.cjs +39 -22
  436. package/dist/sync/index.d.cts +14 -9
  437. package/dist/sync/index.d.cts.map +1 -1
  438. package/dist/sync/index.d.ts +14 -9
  439. package/dist/sync/index.d.ts.map +1 -1
  440. package/dist/sync/index.js +9 -20
  441. package/dist/sync/local-file-identity.cjs +61 -0
  442. package/dist/sync/local-file-identity.cjs.map +1 -0
  443. package/dist/sync/local-file-identity.d.cts +37 -0
  444. package/dist/sync/local-file-identity.d.cts.map +1 -0
  445. package/dist/sync/local-file-identity.d.ts +37 -0
  446. package/dist/sync/local-file-identity.d.ts.map +1 -0
  447. package/dist/sync/local-file-identity.js +60 -0
  448. package/dist/sync/local-file-identity.js.map +1 -0
  449. package/dist/sync/local-file-io.cjs +369 -0
  450. package/dist/sync/local-file-io.cjs.map +1 -0
  451. package/dist/sync/local-file-io.d.cts +76 -0
  452. package/dist/sync/local-file-io.d.cts.map +1 -0
  453. package/dist/sync/local-file-io.d.ts +76 -0
  454. package/dist/sync/local-file-io.d.ts.map +1 -0
  455. package/dist/sync/local-file-io.js +365 -0
  456. package/dist/sync/local-file-io.js.map +1 -0
  457. package/dist/sync/local-filesystem-root.cjs +27 -0
  458. package/dist/sync/local-filesystem-root.cjs.map +1 -0
  459. package/dist/sync/local-filesystem-root.d.cts +18 -0
  460. package/dist/sync/local-filesystem-root.d.cts.map +1 -0
  461. package/dist/sync/local-filesystem-root.d.ts +18 -0
  462. package/dist/sync/local-filesystem-root.d.ts.map +1 -0
  463. package/dist/sync/local-filesystem-root.js +26 -0
  464. package/dist/sync/local-filesystem-root.js.map +1 -0
  465. package/dist/sync/local-sha1.cjs +110 -0
  466. package/dist/sync/local-sha1.cjs.map +1 -0
  467. package/dist/sync/local-sha1.d.cts +31 -0
  468. package/dist/sync/local-sha1.d.cts.map +1 -0
  469. package/dist/sync/local-sha1.d.ts +31 -0
  470. package/dist/sync/local-sha1.d.ts.map +1 -0
  471. package/dist/sync/local-sha1.js +109 -0
  472. package/dist/sync/local-sha1.js.map +1 -0
  473. package/dist/sync/pairing.cjs +118 -29
  474. package/dist/sync/pairing.cjs.map +1 -1
  475. package/dist/sync/pairing.d.cts +7 -2
  476. package/dist/sync/pairing.d.cts.map +1 -1
  477. package/dist/sync/pairing.d.ts +7 -2
  478. package/dist/sync/pairing.d.ts.map +1 -1
  479. package/dist/sync/pairing.js +120 -31
  480. package/dist/sync/pairing.js.map +1 -1
  481. package/dist/sync/path-order.cjs +30 -0
  482. package/dist/sync/path-order.cjs.map +1 -0
  483. package/dist/sync/path-order.d.cts +28 -0
  484. package/dist/sync/path-order.d.cts.map +1 -0
  485. package/dist/sync/path-order.d.ts +28 -0
  486. package/dist/sync/path-order.d.ts.map +1 -0
  487. package/dist/sync/path-order.js +29 -0
  488. package/dist/sync/path-order.js.map +1 -0
  489. package/dist/sync/path-safety.cjs +111 -0
  490. package/dist/sync/path-safety.cjs.map +1 -0
  491. package/dist/sync/path-safety.d.cts +78 -0
  492. package/dist/sync/path-safety.d.cts.map +1 -0
  493. package/dist/sync/path-safety.d.ts +78 -0
  494. package/dist/sync/path-safety.d.ts.map +1 -0
  495. package/dist/sync/path-safety.js +105 -0
  496. package/dist/sync/path-safety.js.map +1 -0
  497. package/dist/sync/paths.d.cts +19 -0
  498. package/dist/sync/paths.d.cts.map +1 -0
  499. package/dist/sync/paths.d.ts +19 -0
  500. package/dist/sync/paths.d.ts.map +1 -0
  501. package/dist/sync/policies/compare.cjs +391 -11
  502. package/dist/sync/policies/compare.cjs.map +1 -1
  503. package/dist/sync/policies/compare.d.cts +100 -2
  504. package/dist/sync/policies/compare.d.cts.map +1 -1
  505. package/dist/sync/policies/compare.d.ts +100 -2
  506. package/dist/sync/policies/compare.d.ts.map +1 -1
  507. package/dist/sync/policies/compare.js +389 -13
  508. package/dist/sync/policies/compare.js.map +1 -1
  509. package/dist/sync/policies/index.cjs +70 -65
  510. package/dist/sync/policies/index.cjs.map +1 -1
  511. package/dist/sync/policies/index.d.cts +35 -6
  512. package/dist/sync/policies/index.d.cts.map +1 -1
  513. package/dist/sync/policies/index.d.ts +35 -6
  514. package/dist/sync/policies/index.d.ts.map +1 -1
  515. package/dist/sync/policies/index.js +70 -65
  516. package/dist/sync/policies/index.js.map +1 -1
  517. package/dist/sync/prefix.cjs +96 -0
  518. package/dist/sync/prefix.cjs.map +1 -0
  519. package/dist/sync/prefix.d.cts +55 -0
  520. package/dist/sync/prefix.d.cts.map +1 -0
  521. package/dist/sync/prefix.d.ts +55 -0
  522. package/dist/sync/prefix.d.ts.map +1 -0
  523. package/dist/sync/prefix.js +92 -0
  524. package/dist/sync/prefix.js.map +1 -0
  525. package/dist/sync/regexp-safety.cjs +192 -0
  526. package/dist/sync/regexp-safety.cjs.map +1 -0
  527. package/dist/sync/regexp-safety.d.cts +29 -0
  528. package/dist/sync/regexp-safety.d.cts.map +1 -0
  529. package/dist/sync/regexp-safety.d.ts +29 -0
  530. package/dist/sync/regexp-safety.d.ts.map +1 -0
  531. package/dist/sync/regexp-safety.js +190 -0
  532. package/dist/sync/regexp-safety.js.map +1 -0
  533. package/dist/sync/scan-events.cjs +33 -0
  534. package/dist/sync/scan-events.cjs.map +1 -0
  535. package/dist/sync/scan-events.d.cts +17 -0
  536. package/dist/sync/scan-events.d.cts.map +1 -0
  537. package/dist/sync/scan-events.d.ts +17 -0
  538. package/dist/sync/scan-events.d.ts.map +1 -0
  539. package/dist/sync/scan-events.js +32 -0
  540. package/dist/sync/scan-events.js.map +1 -0
  541. package/dist/sync/scan-limit.cjs +33 -0
  542. package/dist/sync/scan-limit.cjs.map +1 -0
  543. package/dist/sync/scan-limit.d.cts +21 -0
  544. package/dist/sync/scan-limit.d.cts.map +1 -0
  545. package/dist/sync/scan-limit.d.ts +21 -0
  546. package/dist/sync/scan-limit.d.ts.map +1 -0
  547. package/dist/sync/scan-limit.js +31 -0
  548. package/dist/sync/scan-limit.js.map +1 -0
  549. package/dist/sync/scanners/b2.cjs +239 -55
  550. package/dist/sync/scanners/b2.cjs.map +1 -1
  551. package/dist/sync/scanners/b2.d.cts +26 -7
  552. package/dist/sync/scanners/b2.d.cts.map +1 -1
  553. package/dist/sync/scanners/b2.d.ts +26 -7
  554. package/dist/sync/scanners/b2.d.ts.map +1 -1
  555. package/dist/sync/scanners/b2.js +239 -55
  556. package/dist/sync/scanners/b2.js.map +1 -1
  557. package/dist/sync/scanners/local.cjs +215 -56
  558. package/dist/sync/scanners/local.cjs.map +1 -1
  559. package/dist/sync/scanners/local.d.cts +22 -7
  560. package/dist/sync/scanners/local.d.cts.map +1 -1
  561. package/dist/sync/scanners/local.d.ts +22 -7
  562. package/dist/sync/scanners/local.d.ts.map +1 -1
  563. package/dist/sync/scanners/local.js +216 -57
  564. package/dist/sync/scanners/local.js.map +1 -1
  565. package/dist/sync/sha1-metadata.cjs +94 -0
  566. package/dist/sync/sha1-metadata.cjs.map +1 -0
  567. package/dist/sync/sha1-metadata.d.cts +82 -0
  568. package/dist/sync/sha1-metadata.d.cts.map +1 -0
  569. package/dist/sync/sha1-metadata.d.ts +82 -0
  570. package/dist/sync/sha1-metadata.d.ts.map +1 -0
  571. package/dist/sync/sha1-metadata.js +89 -0
  572. package/dist/sync/sha1-metadata.js.map +1 -0
  573. package/dist/sync/sha1-options.cjs +23 -0
  574. package/dist/sync/sha1-options.cjs.map +1 -0
  575. package/dist/sync/sha1-options.d.cts +14 -0
  576. package/dist/sync/sha1-options.d.cts.map +1 -0
  577. package/dist/sync/sha1-options.d.ts +14 -0
  578. package/dist/sync/sha1-options.d.ts.map +1 -0
  579. package/dist/sync/sha1-options.js +21 -0
  580. package/dist/sync/sha1-options.js.map +1 -0
  581. package/dist/sync/synchronizer.cjs +783 -197
  582. package/dist/sync/synchronizer.cjs.map +1 -1
  583. package/dist/sync/synchronizer.d.cts +47 -1
  584. package/dist/sync/synchronizer.d.cts.map +1 -1
  585. package/dist/sync/synchronizer.d.ts +47 -1
  586. package/dist/sync/synchronizer.d.ts.map +1 -1
  587. package/dist/sync/synchronizer.js +780 -173
  588. package/dist/sync/synchronizer.js.map +1 -1
  589. package/dist/sync/types.d.cts +208 -16
  590. package/dist/sync/types.d.cts.map +1 -1
  591. package/dist/sync/types.d.ts +208 -16
  592. package/dist/sync/types.d.ts.map +1 -1
  593. package/dist/types/auth.cjs +80 -56
  594. package/dist/types/auth.cjs.map +1 -1
  595. package/dist/types/auth.d.cts +71 -9
  596. package/dist/types/auth.d.cts.map +1 -1
  597. package/dist/types/auth.d.ts +71 -9
  598. package/dist/types/auth.d.ts.map +1 -1
  599. package/dist/types/auth.js +81 -57
  600. package/dist/types/auth.js.map +1 -1
  601. package/dist/types/backup.d.cts +80 -0
  602. package/dist/types/backup.d.cts.map +1 -0
  603. package/dist/types/backup.d.ts +80 -0
  604. package/dist/types/backup.d.ts.map +1 -0
  605. package/dist/types/bucket.cjs +74 -38
  606. package/dist/types/bucket.cjs.map +1 -1
  607. package/dist/types/bucket.d.cts +4 -2
  608. package/dist/types/bucket.d.cts.map +1 -1
  609. package/dist/types/bucket.d.ts +4 -2
  610. package/dist/types/bucket.d.ts.map +1 -1
  611. package/dist/types/bucket.js +75 -41
  612. package/dist/types/bucket.js.map +1 -1
  613. package/dist/types/download.cjs +62 -0
  614. package/dist/types/download.cjs.map +1 -0
  615. package/dist/types/download.d.cts +98 -0
  616. package/dist/types/download.d.cts.map +1 -1
  617. package/dist/types/download.d.ts +98 -0
  618. package/dist/types/download.d.ts.map +1 -1
  619. package/dist/types/download.js +61 -0
  620. package/dist/types/download.js.map +1 -0
  621. package/dist/types/encryption.cjs +194 -328
  622. package/dist/types/encryption.cjs.map +1 -1
  623. package/dist/types/encryption.d.cts +48 -0
  624. package/dist/types/encryption.d.cts.map +1 -1
  625. package/dist/types/encryption.d.ts +48 -0
  626. package/dist/types/encryption.d.ts.map +1 -1
  627. package/dist/types/encryption.js +192 -311
  628. package/dist/types/encryption.js.map +1 -1
  629. package/dist/types/errors.cjs +56 -0
  630. package/dist/types/errors.cjs.map +1 -0
  631. package/dist/types/errors.d.cts +13 -4
  632. package/dist/types/errors.d.cts.map +1 -1
  633. package/dist/types/errors.d.ts +13 -4
  634. package/dist/types/errors.d.ts.map +1 -1
  635. package/dist/types/errors.js +56 -0
  636. package/dist/types/errors.js.map +1 -0
  637. package/dist/types/file.cjs +36 -19
  638. package/dist/types/file.cjs.map +1 -1
  639. package/dist/types/file.d.cts +17 -4
  640. package/dist/types/file.d.cts.map +1 -1
  641. package/dist/types/file.d.ts +17 -4
  642. package/dist/types/file.d.ts.map +1 -1
  643. package/dist/types/file.js +37 -21
  644. package/dist/types/file.js.map +1 -1
  645. package/dist/types/ids.cjs +83 -9
  646. package/dist/types/ids.cjs.map +1 -1
  647. package/dist/types/ids.d.cts +32 -0
  648. package/dist/types/ids.d.cts.map +1 -1
  649. package/dist/types/ids.d.ts +32 -0
  650. package/dist/types/ids.d.ts.map +1 -1
  651. package/dist/types/ids.js +82 -16
  652. package/dist/types/ids.js.map +1 -1
  653. package/dist/types/index.d.cts +18 -13
  654. package/dist/types/index.d.cts.map +1 -1
  655. package/dist/types/index.d.ts +18 -13
  656. package/dist/types/index.d.ts.map +1 -1
  657. package/dist/types/key.d.cts +44 -8
  658. package/dist/types/key.d.cts.map +1 -1
  659. package/dist/types/key.d.ts +44 -8
  660. package/dist/types/key.d.ts.map +1 -1
  661. package/dist/types/lock.cjs +33 -13
  662. package/dist/types/lock.cjs.map +1 -1
  663. package/dist/types/lock.d.cts +14 -0
  664. package/dist/types/lock.d.cts.map +1 -1
  665. package/dist/types/lock.d.ts +14 -0
  666. package/dist/types/lock.d.ts.map +1 -1
  667. package/dist/types/lock.js +34 -15
  668. package/dist/types/lock.js.map +1 -1
  669. package/dist/types/notifications.cjs +44 -22
  670. package/dist/types/notifications.cjs.map +1 -1
  671. package/dist/types/notifications.d.cts +5 -3
  672. package/dist/types/notifications.d.cts.map +1 -1
  673. package/dist/types/notifications.d.ts +5 -3
  674. package/dist/types/notifications.d.ts.map +1 -1
  675. package/dist/types/notifications.js +45 -23
  676. package/dist/types/notifications.js.map +1 -1
  677. package/dist/types/partner.cjs +32 -0
  678. package/dist/types/partner.cjs.map +1 -0
  679. package/dist/types/partner.d.cts +394 -0
  680. package/dist/types/partner.d.cts.map +1 -0
  681. package/dist/types/partner.d.ts +394 -0
  682. package/dist/types/partner.d.ts.map +1 -0
  683. package/dist/types/partner.js +29 -0
  684. package/dist/types/partner.js.map +1 -0
  685. package/dist/types/upload.d.cts +53 -6
  686. package/dist/types/upload.d.cts.map +1 -1
  687. package/dist/types/upload.d.ts +53 -6
  688. package/dist/types/upload.d.ts.map +1 -1
  689. package/dist/upload/abort-scope.cjs +46 -0
  690. package/dist/upload/abort-scope.cjs.map +1 -0
  691. package/dist/upload/abort-scope.d.cts +26 -0
  692. package/dist/upload/abort-scope.d.cts.map +1 -0
  693. package/dist/upload/abort-scope.d.ts +26 -0
  694. package/dist/upload/abort-scope.d.ts.map +1 -0
  695. package/dist/upload/abort-scope.js +45 -0
  696. package/dist/upload/abort-scope.js.map +1 -0
  697. package/dist/upload/cancel.cjs +183 -8
  698. package/dist/upload/cancel.cjs.map +1 -1
  699. package/dist/upload/cancel.d.cts +110 -2
  700. package/dist/upload/cancel.d.cts.map +1 -1
  701. package/dist/upload/cancel.d.ts +110 -2
  702. package/dist/upload/cancel.d.ts.map +1 -1
  703. package/dist/upload/cancel.js +178 -9
  704. package/dist/upload/cancel.js.map +1 -1
  705. package/dist/upload/concurrency.cjs +79 -52
  706. package/dist/upload/concurrency.cjs.map +1 -1
  707. package/dist/upload/concurrency.js +79 -53
  708. package/dist/upload/concurrency.js.map +1 -1
  709. package/dist/upload/finish.cjs +54 -0
  710. package/dist/upload/finish.cjs.map +1 -0
  711. package/dist/upload/finish.d.cts +26 -0
  712. package/dist/upload/finish.d.cts.map +1 -0
  713. package/dist/upload/finish.d.ts +26 -0
  714. package/dist/upload/finish.d.ts.map +1 -0
  715. package/dist/upload/finish.js +54 -0
  716. package/dist/upload/finish.js.map +1 -0
  717. package/dist/upload/large.cjs +305 -218
  718. package/dist/upload/large.cjs.map +1 -1
  719. package/dist/upload/large.d.cts +90 -9
  720. package/dist/upload/large.d.cts.map +1 -1
  721. package/dist/upload/large.d.ts +90 -9
  722. package/dist/upload/large.d.ts.map +1 -1
  723. package/dist/upload/large.js +305 -218
  724. package/dist/upload/large.js.map +1 -1
  725. package/dist/upload/options.cjs +28 -0
  726. package/dist/upload/options.cjs.map +1 -0
  727. package/dist/upload/options.d.cts +116 -0
  728. package/dist/upload/options.d.cts.map +1 -0
  729. package/dist/upload/options.d.ts +116 -0
  730. package/dist/upload/options.d.ts.map +1 -0
  731. package/dist/upload/options.js +27 -0
  732. package/dist/upload/options.js.map +1 -0
  733. package/dist/upload/resume.cjs +334 -33
  734. package/dist/upload/resume.cjs.map +1 -1
  735. package/dist/upload/resume.d.cts +84 -12
  736. package/dist/upload/resume.d.cts.map +1 -1
  737. package/dist/upload/resume.d.ts +84 -12
  738. package/dist/upload/resume.d.ts.map +1 -1
  739. package/dist/upload/resume.js +331 -33
  740. package/dist/upload/resume.js.map +1 -1
  741. package/dist/upload/retry.cjs +191 -0
  742. package/dist/upload/retry.cjs.map +1 -0
  743. package/dist/upload/retry.d.cts +127 -0
  744. package/dist/upload/retry.d.cts.map +1 -0
  745. package/dist/upload/retry.d.ts +127 -0
  746. package/dist/upload/retry.d.ts.map +1 -0
  747. package/dist/upload/retry.js +187 -0
  748. package/dist/upload/retry.js.map +1 -0
  749. package/dist/upload/single.cjs +69 -44
  750. package/dist/upload/single.cjs.map +1 -1
  751. package/dist/upload/single.d.cts +8 -1
  752. package/dist/upload/single.d.cts.map +1 -1
  753. package/dist/upload/single.d.ts +8 -1
  754. package/dist/upload/single.d.ts.map +1 -1
  755. package/dist/upload/single.js +69 -44
  756. package/dist/upload/single.js.map +1 -1
  757. package/dist/upload/stream.cjs +319 -193
  758. package/dist/upload/stream.cjs.map +1 -1
  759. package/dist/upload/stream.d.cts +9 -1
  760. package/dist/upload/stream.d.cts.map +1 -1
  761. package/dist/upload/stream.d.ts +9 -1
  762. package/dist/upload/stream.d.ts.map +1 -1
  763. package/dist/upload/stream.js +318 -192
  764. package/dist/upload/stream.js.map +1 -1
  765. package/dist/util/abort.cjs +114 -0
  766. package/dist/util/abort.cjs.map +1 -0
  767. package/dist/util/abort.d.cts +65 -0
  768. package/dist/util/abort.d.cts.map +1 -0
  769. package/dist/util/abort.d.ts +65 -0
  770. package/dist/util/abort.d.ts.map +1 -0
  771. package/dist/util/abort.js +109 -0
  772. package/dist/util/abort.js.map +1 -0
  773. package/dist/util/best-effort.cjs +42 -8
  774. package/dist/util/best-effort.cjs.map +1 -1
  775. package/dist/util/best-effort.d.cts +2 -1
  776. package/dist/util/best-effort.d.cts.map +1 -1
  777. package/dist/util/best-effort.d.ts +2 -1
  778. package/dist/util/best-effort.d.ts.map +1 -1
  779. package/dist/util/best-effort.js +43 -9
  780. package/dist/util/best-effort.js.map +1 -1
  781. package/dist/util/bytes.cjs +23 -0
  782. package/dist/util/bytes.cjs.map +1 -0
  783. package/dist/util/bytes.d.cts +15 -0
  784. package/dist/util/bytes.d.cts.map +1 -0
  785. package/dist/util/bytes.d.ts +15 -0
  786. package/dist/util/bytes.d.ts.map +1 -0
  787. package/dist/util/bytes.js +23 -0
  788. package/dist/util/bytes.js.map +1 -0
  789. package/dist/util/crypto.cjs +68 -0
  790. package/dist/util/crypto.cjs.map +1 -0
  791. package/dist/util/crypto.d.cts +26 -0
  792. package/dist/util/crypto.d.cts.map +1 -0
  793. package/dist/util/crypto.d.ts +26 -0
  794. package/dist/util/crypto.d.ts.map +1 -0
  795. package/dist/util/crypto.js +66 -0
  796. package/dist/util/crypto.js.map +1 -0
  797. package/dist/util/defaults.cjs +28 -9
  798. package/dist/util/defaults.cjs.map +1 -1
  799. package/dist/util/defaults.d.cts +2 -0
  800. package/dist/util/defaults.d.cts.map +1 -1
  801. package/dist/util/defaults.d.ts +2 -0
  802. package/dist/util/defaults.d.ts.map +1 -1
  803. package/dist/util/defaults.js +28 -11
  804. package/dist/util/defaults.js.map +1 -1
  805. package/dist/util/error-reason.cjs +41 -0
  806. package/dist/util/error-reason.cjs.map +1 -0
  807. package/dist/util/error-reason.d.cts +9 -0
  808. package/dist/util/error-reason.d.cts.map +1 -0
  809. package/dist/util/error-reason.d.ts +9 -0
  810. package/dist/util/error-reason.d.ts.map +1 -0
  811. package/dist/util/error-reason.js +41 -0
  812. package/dist/util/error-reason.js.map +1 -0
  813. package/dist/util/http.cjs +23 -0
  814. package/dist/util/http.cjs.map +1 -0
  815. package/dist/util/http.d.cts +13 -0
  816. package/dist/util/http.d.cts.map +1 -0
  817. package/dist/util/http.d.ts +13 -0
  818. package/dist/util/http.d.ts.map +1 -0
  819. package/dist/util/http.js +23 -0
  820. package/dist/util/http.js.map +1 -0
  821. package/dist/util/md5.cjs +211 -0
  822. package/dist/util/md5.cjs.map +1 -0
  823. package/dist/util/md5.d.cts +43 -0
  824. package/dist/util/md5.d.cts.map +1 -0
  825. package/dist/util/md5.d.ts +43 -0
  826. package/dist/util/md5.d.ts.map +1 -0
  827. package/dist/util/md5.js +209 -0
  828. package/dist/util/md5.js.map +1 -0
  829. package/dist/util/normalize.cjs +66 -7
  830. package/dist/util/normalize.cjs.map +1 -1
  831. package/dist/util/normalize.d.cts +7 -7
  832. package/dist/util/normalize.d.cts.map +1 -1
  833. package/dist/util/normalize.d.ts +7 -7
  834. package/dist/util/normalize.d.ts.map +1 -1
  835. package/dist/util/normalize.js +67 -10
  836. package/dist/util/normalize.js.map +1 -1
  837. package/dist/util/paginator.cjs +69 -14
  838. package/dist/util/paginator.cjs.map +1 -1
  839. package/dist/util/paginator.d.cts +3 -1
  840. package/dist/util/paginator.d.cts.map +1 -1
  841. package/dist/util/paginator.d.ts +3 -1
  842. package/dist/util/paginator.d.ts.map +1 -1
  843. package/dist/util/paginator.js +70 -16
  844. package/dist/util/paginator.js.map +1 -1
  845. package/dist/util/plan-ranges.cjs +47 -22
  846. package/dist/util/plan-ranges.cjs.map +1 -1
  847. package/dist/util/plan-ranges.js +48 -24
  848. package/dist/util/plan-ranges.js.map +1 -1
  849. package/dist/util/sha1.cjs +27 -0
  850. package/dist/util/sha1.cjs.map +1 -0
  851. package/dist/util/sha1.d.cts +17 -0
  852. package/dist/util/sha1.d.cts.map +1 -0
  853. package/dist/util/sha1.d.ts +17 -0
  854. package/dist/util/sha1.d.ts.map +1 -0
  855. package/dist/util/sha1.js +26 -0
  856. package/dist/util/sha1.js.map +1 -0
  857. package/dist/util/text-codec.cjs +29 -5
  858. package/dist/util/text-codec.cjs.map +1 -1
  859. package/dist/util/text-codec.js +30 -7
  860. package/dist/util/text-codec.js.map +1 -1
  861. package/dist/util/to-error.cjs +18 -4
  862. package/dist/util/to-error.cjs.map +1 -1
  863. package/dist/util/to-error.js +19 -5
  864. package/dist/util/to-error.js.map +1 -1
  865. package/dist/version.cjs +17 -5
  866. package/dist/version.cjs.map +1 -1
  867. package/dist/version.d.cts +3 -3
  868. package/dist/version.d.ts +3 -3
  869. package/dist/version.js +19 -6
  870. package/dist/version.js.map +1 -1
  871. package/package.json +45 -20
  872. package/dist/auth/index.cjs.map +0 -1
  873. package/dist/auth/index.js.map +0 -1
  874. package/dist/index.cjs.map +0 -1
  875. package/dist/index.js.map +0 -1
  876. package/dist/notifications/index.cjs.map +0 -1
  877. package/dist/notifications/index.js.map +0 -1
  878. package/dist/package.json.cjs +0 -9
  879. package/dist/package.json.cjs.map +0 -1
  880. package/dist/package.json.js +0 -9
  881. package/dist/package.json.js.map +0 -1
  882. package/dist/streams/index.cjs.map +0 -1
  883. package/dist/streams/index.js.map +0 -1
  884. package/dist/sync/index.cjs.map +0 -1
  885. package/dist/sync/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ids.cjs","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"],"names":[],"mappings":";;AAmDO,SAAS,UAAU,KAAwB;AAChD,SAAO;AACT;AAQO,SAAS,SAAS,KAAuB;AAC9C,SAAO;AACT;AAQO,SAAS,OAAO,KAAqB;AAC1C,SAAO;AACT;AAQO,SAAS,MAAM,KAAoB;AACxC,SAAO;AACT;AAQO,SAAS,iBAAiB,KAA+B;AAC9D,SAAO;AACT;AAeO,SAAS,YAAY,KAA0B;AACpD,SAAO;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,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,GAAG,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAElD,wGAAwG;AACxG,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAE9D,mGAAmG;AACnG,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,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H,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"}
@@ -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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,EAAE,aAAa,CAAC,CAAA;AAEtD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,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
@@ -1,27 +1,93 @@
1
+ //#region src/types/ids.ts
2
+ /**
3
+ * Creates a branded {@link AccountId} from a raw string.
4
+ * @param raw - The raw account ID string from the B2 API.
5
+ *
6
+ * @returns A branded AccountId value.
7
+ */
1
8
  function accountId(raw) {
2
- return raw;
9
+ return raw;
3
10
  }
11
+ /**
12
+ * Creates a branded {@link BucketId} from a raw string.
13
+ * @param raw - The raw bucket ID string from the B2 API.
14
+ *
15
+ * @returns A branded BucketId value.
16
+ */
4
17
  function bucketId(raw) {
5
- return raw;
18
+ return raw;
6
19
  }
20
+ /**
21
+ * Creates a branded {@link FileId} from a raw string.
22
+ * @param raw - The raw file ID string from the B2 API.
23
+ *
24
+ * @returns A branded FileId value.
25
+ */
7
26
  function fileId(raw) {
8
- return raw;
27
+ return raw;
9
28
  }
29
+ /**
30
+ * Creates a branded {@link KeyId} from a raw string.
31
+ * @param raw - The raw key ID string from the B2 API.
32
+ *
33
+ * @returns A branded KeyId value.
34
+ */
10
35
  function keyId(raw) {
11
- return raw;
36
+ return raw;
12
37
  }
38
+ /**
39
+ * Creates a branded {@link ApplicationKeyId} from a raw string.
40
+ * @param raw - The raw application key ID string from the B2 API.
41
+ *
42
+ * @returns A branded ApplicationKeyId value.
43
+ */
13
44
  function applicationKeyId(raw) {
14
- return raw;
45
+ return raw;
15
46
  }
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
+ /**
75
+ * Creates a branded {@link LargeFileId} from a raw string.
76
+ *
77
+ * `LargeFileId` is the same wire-level shape as `FileId` but is a
78
+ * distinct brand so that "ID of an in-progress multipart upload" and
79
+ * "ID of a committed file version" don't get mixed up by accident.
80
+ * `b2_start_large_file` returns one; `b2_finish_large_file` consumes it
81
+ * and produces a regular `FileId`.
82
+ *
83
+ * @param raw - The raw large-file ID string from the B2 API.
84
+ *
85
+ * @returns A branded LargeFileId value.
86
+ */
16
87
  function largeFileId(raw) {
17
- return raw;
18
- }
19
- export {
20
- accountId,
21
- applicationKeyId,
22
- bucketId,
23
- fileId,
24
- keyId,
25
- largeFileId
26
- };
27
- //# sourceMappingURL=ids.js.map
88
+ return raw;
89
+ }
90
+ //#endregion
91
+ export { accountId, applicationKeyId, bucketId, computerId, fileId, groupId, keyId, largeFileId, partnerToken };
92
+
93
+ //# sourceMappingURL=ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ids.js","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"],"names":[],"mappings":"AAmDO,SAAS,UAAU,KAAwB;AAChD,SAAO;AACT;AAQO,SAAS,SAAS,KAAuB;AAC9C,SAAO;AACT;AAQO,SAAS,OAAO,KAAqB;AAC1C,SAAO;AACT;AAQO,SAAS,MAAM,KAAoB;AACxC,SAAO;AACT;AAQO,SAAS,iBAAiB,KAA+B;AAC9D,SAAO;AACT;AAeO,SAAS,YAAY,KAA0B;AACpD,SAAO;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"}
@@ -3,23 +3,28 @@
3
3
  * Public type definitions for the B2 SDK.
4
4
  * Re-exports all branded IDs, request/response interfaces, and configuration types.
5
5
  */
6
- export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, FileId, KeyId, LargeFileId, UploadAuthToken, UploadUrl, } from './ids.js';
7
- export { accountId, applicationKeyId, bucketId, fileId, keyId, largeFileId } from './ids.js';
8
- export type { AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
6
+ export type { AllowedBucket, AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
9
7
  export { Capability } from './auth.js';
10
- export type { BucketInfo, BucketRetentionPolicy, RetentionPeriod, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, UpdateBucketRequest, } from './bucket.js';
8
+ export type { ComputerBackup, DeleteComputerRequest, DeleteComputerResponse, DeleteComputerResult, ListComputersRequest, ListComputersResponse, ListComputersResult, } from './backup.js';
9
+ export type { BucketInfo, BucketRetentionPolicy, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
11
10
  export { BucketRetentionMode, BucketType, CorsOperation } from './bucket.js';
12
- export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, } from './file.js';
13
- export { FileAction, MetadataDirective } from './file.js';
14
- export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
15
- export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaders, } from './download.js';
16
- export type { EncryptionSetting, NoEncryption, SseB2Setting, SseCCustomerSetting, } from './encryption.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, SseCPublicSetting, } from './encryption.js';
17
14
  export { EncryptionAlgorithm, EncryptionKey, EncryptionMode, SSE_B2, SSE_NONE, sseCustomer, } from './encryption.js';
18
- export type { FileRetentionValue, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
15
+ export type { B2ErrorCode, B2ErrorResponse, KnownB2ErrorCode } from './errors.js';
16
+ export { KNOWN_B2_ERROR_CODES } from './errors.js';
17
+ export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, ReplicationStatus, } from './file.js';
18
+ export { FileAction, 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';
21
+ export type { ApplicationKey, CreateKeyBucketScope, CreateKeyOptions, CreateKeyOptionsBase, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
22
+ export type { FileRetentionValue, ReadableFileRetention, ReadableLegalHold, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
19
23
  export { LegalHoldValue, RetentionMode } from './lock.js';
20
- export type { ApplicationKey, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
21
- export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.js';
22
24
  export type { EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
23
25
  export { EventType } from './notifications.js';
24
- export type { B2ErrorCode, B2ErrorResponse } from './errors.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';
28
+ export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.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';
25
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,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,WAAW,EACX,eAAe,EACf,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,SAAS,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B,CAAA;AAExB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,MAAM,EACN,QAAQ,EACR,WAAW,GACZ,MAAM,iBAAiB,CAAA;AAExB,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzD,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAA;AAEjB,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EACV,qBAAqB,EACrB,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,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,UAAU,EACV,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,eAA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ACvB,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"}
@@ -3,23 +3,28 @@
3
3
  * Public type definitions for the B2 SDK.
4
4
  * Re-exports all branded IDs, request/response interfaces, and configuration types.
5
5
  */
6
- export type { AccountId, ApplicationKeyId, AuthToken, Brand, BrandTag, BucketId, FileId, KeyId, LargeFileId, UploadAuthToken, UploadUrl, } from './ids.js';
7
- export { accountId, applicationKeyId, bucketId, fileId, keyId, largeFileId } from './ids.js';
8
- export type { AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
6
+ export type { AllowedBucket, AllowedInfo, ApiInfo, AuthorizeAccountRequest, AuthorizeAccountResponse, GroupsApiInfo, StorageApiInfo, } from './auth.js';
9
7
  export { Capability } from './auth.js';
10
- export type { BucketInfo, BucketRetentionPolicy, RetentionPeriod, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, UpdateBucketRequest, } from './bucket.js';
8
+ export type { ComputerBackup, DeleteComputerRequest, DeleteComputerResponse, DeleteComputerResult, ListComputersRequest, ListComputersResponse, ListComputersResult, } from './backup.js';
9
+ export type { BucketInfo, BucketRetentionPolicy, CorsRule, CreateBucketRequest, DeleteBucketRequest, LifecycleRule, ListBucketsRequest, ListBucketsResponse, RetentionPeriod, UpdateBucketRequest, } from './bucket.js';
11
10
  export { BucketRetentionMode, BucketType, CorsOperation } from './bucket.js';
12
- export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, } from './file.js';
13
- export { FileAction, MetadataDirective } from './file.js';
14
- export type { CancelLargeFileRequest, CancelLargeFileResponse, FinishLargeFileRequest, GetUploadPartUrlRequest, GetUploadPartUrlResponse, GetUploadUrlRequest, GetUploadUrlResponse, ListPartsRequest, ListPartsResponse, ListUnfinishedLargeFilesRequest, ListUnfinishedLargeFilesResponse, PartInfo, StartLargeFileRequest, StartLargeFileResponse, UnfinishedLargeFile, UploadFileHeaders, UploadPartHeaders, UploadPartResponse, } from './upload.js';
15
- export type { DownloadAuthorizationRequest, DownloadAuthorizationResponse, DownloadByIdRequest, DownloadByNameRequest, DownloadHeaders, } from './download.js';
16
- export type { EncryptionSetting, NoEncryption, SseB2Setting, SseCCustomerSetting, } from './encryption.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, SseCPublicSetting, } from './encryption.js';
17
14
  export { EncryptionAlgorithm, EncryptionKey, EncryptionMode, SSE_B2, SSE_NONE, sseCustomer, } from './encryption.js';
18
- export type { FileRetentionValue, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
15
+ export type { B2ErrorCode, B2ErrorResponse, KnownB2ErrorCode } from './errors.js';
16
+ export { KNOWN_B2_ERROR_CODES } from './errors.js';
17
+ export type { CopyFileRequest, CopyPartRequest, CopyPartResponse, DeleteFileVersionRequest, DeleteFileVersionResponse, FileVersion, GetFileInfoRequest, HideFileRequest, ListFileNamesRequest, ListFileNamesResponse, ListFileVersionsRequest, ListFileVersionsResponse, ReplicationStatus, } from './file.js';
18
+ export { FileAction, 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';
21
+ export type { ApplicationKey, CreateKeyBucketScope, CreateKeyOptions, CreateKeyOptionsBase, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
22
+ export type { FileRetentionValue, ReadableFileRetention, ReadableLegalHold, UpdateFileLegalHoldRequest, UpdateFileLegalHoldResponse, UpdateFileRetentionRequest, UpdateFileRetentionResponse, } from './lock.js';
19
23
  export { LegalHoldValue, RetentionMode } from './lock.js';
20
- export type { ApplicationKey, CreateKeyRequest, DeleteKeyRequest, FullApplicationKey, ListKeysRequest, ListKeysResponse, } from './key.js';
21
- export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.js';
22
24
  export type { EventNotificationRule, GetBucketNotificationRulesRequest, GetBucketNotificationRulesResponse, SetBucketNotificationRulesRequest, SetBucketNotificationRulesResponse, } from './notifications.js';
23
25
  export { EventType } from './notifications.js';
24
- export type { B2ErrorCode, B2ErrorResponse } from './errors.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';
28
+ export type { ReplicationConfiguration, ReplicationDestination, ReplicationRule, ReplicationSource, } from './replication.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';
25
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,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,WAAW,EACX,eAAe,EACf,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE5F,YAAY,EACV,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE5E,YAA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EzB,YAAY,EACV,qBAAqB,EACrB,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,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,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,wBAAwB,EACxB,eAAe,EACf,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,sCAAsC,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAC1F,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,mBAAmB,EACnB,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ACjC,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,6BAA6B,EAC7B,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,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"}
@@ -1,20 +1,42 @@
1
1
  import { Capability } from './auth.js';
2
2
  import { AccountId, ApplicationKeyId, BucketId } from './ids.js';
3
- /** Request parameters for the `b2_create_key` API call. Creates a new application key. */
4
- export interface CreateKeyRequest {
5
- /** Account to create the key for. */
6
- readonly accountId: AccountId;
3
+ /** Shared request parameters for creating an application key. */
4
+ export interface CreateKeyOptionsBase {
7
5
  /** Capabilities to grant to the new key. */
8
6
  readonly capabilities: readonly Capability[];
9
7
  /** Human-readable name for the key (must be unique within the account). */
10
8
  readonly keyName: string;
11
9
  /** Optional duration in seconds before the key expires. Omit for a key that never expires. */
12
10
  readonly validDurationInSeconds?: number;
13
- /** Optional bucket restriction. When set, the key only grants access to this bucket. */
14
- readonly bucketId?: BucketId;
15
11
  /** Optional file name prefix restriction. When set, the key only grants access to files with this prefix. */
16
12
  readonly namePrefix?: string;
17
13
  }
14
+ /** Mutually exclusive bucket scope fields for key creation. */
15
+ export type CreateKeyBucketScope = {
16
+ /**
17
+ * Optional bucket restrictions. A bucket list restricts the key to those
18
+ * buckets; null or omitted grants access to all buckets.
19
+ */
20
+ readonly bucketIds?: readonly BucketId[] | null;
21
+ /** @deprecated Use `bucketIds: [bucketId]` instead. */
22
+ readonly bucketId?: never;
23
+ } | {
24
+ /**
25
+ * Single-bucket restriction.
26
+ *
27
+ * @deprecated Use `bucketIds: [bucketId]` instead.
28
+ */
29
+ readonly bucketId: BucketId;
30
+ /** Do not provide `bucketIds` with the deprecated `bucketId` alias. */
31
+ readonly bucketIds?: never;
32
+ };
33
+ /** High-level options for creating an application key. */
34
+ export type CreateKeyOptions = CreateKeyOptionsBase & CreateKeyBucketScope;
35
+ /** Request parameters for the `b2_create_key` API call. Creates a new application key. */
36
+ export type CreateKeyRequest = CreateKeyOptions & {
37
+ /** Account to create the key for. */
38
+ readonly accountId: AccountId;
39
+ };
18
40
  /**
19
41
  * Full application key including the secret, returned only at creation time by `b2_create_key`.
20
42
  * The `applicationKey` secret is never returned again after this response.
@@ -32,7 +54,14 @@ export interface FullApplicationKey {
32
54
  readonly accountId: AccountId;
33
55
  /** UTC timestamp (milliseconds) when this key expires, or null if it does not expire. */
34
56
  readonly expirationTimestamp: number | null;
35
- /** Bucket ID this key is restricted to, or null if unrestricted. */
57
+ /** Bucket IDs this key is restricted to, or null if unrestricted. */
58
+ readonly bucketIds: readonly BucketId[] | null;
59
+ /**
60
+ * Bucket ID this key is restricted to when it has exactly one bucket, or null
61
+ * if unrestricted or multi-bucket.
62
+ *
63
+ * @deprecated Use `bucketIds` instead.
64
+ */
36
65
  readonly bucketId: BucketId | null;
37
66
  /** File name prefix this key is restricted to, or null if unrestricted. */
38
67
  readonly namePrefix: string | null;
@@ -53,7 +82,14 @@ export interface ApplicationKey {
53
82
  readonly accountId: AccountId;
54
83
  /** UTC timestamp (milliseconds) when this key expires, or null if it does not expire. */
55
84
  readonly expirationTimestamp: number | null;
56
- /** Bucket ID this key is restricted to, or null if unrestricted. */
85
+ /** Bucket IDs this key is restricted to, or null if unrestricted. */
86
+ readonly bucketIds: readonly BucketId[] | null;
87
+ /**
88
+ * Bucket ID this key is restricted to when it has exactly one bucket, or null
89
+ * if unrestricted or multi-bucket.
90
+ *
91
+ * @deprecated Use `bucketIds` instead.
92
+ */
57
93
  readonly bucketId: BucketId | null;
58
94
  /** File name prefix this key is restricted to, or null if unrestricted. */
59
95
  readonly namePrefix: string | null;
@@ -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,0FAA0F;AAC1F,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,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,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC5B,6GAA6G;IAC7G,QAAQ,CAAC,UAAU,CAAC,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;IACxB,iDAAiD;IACjD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAA;IAC3C,wCAAwC;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,CAAA;IAC5C,kCAAkC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,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,MAAM,EAAE,CAAA;CACpC;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,iFAAiF;IACjF,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAA;CAClD;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,CAAA;IACxC,2FAA2F;IAC3F,QAAQ,CAAC,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvD;AAED,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAA;CAC5C"}
@@ -1,20 +1,42 @@
1
1
  import { Capability } from './auth.js';
2
2
  import { AccountId, ApplicationKeyId, BucketId } from './ids.js';
3
- /** Request parameters for the `b2_create_key` API call. Creates a new application key. */
4
- export interface CreateKeyRequest {
5
- /** Account to create the key for. */
6
- readonly accountId: AccountId;
3
+ /** Shared request parameters for creating an application key. */
4
+ export interface CreateKeyOptionsBase {
7
5
  /** Capabilities to grant to the new key. */
8
6
  readonly capabilities: readonly Capability[];
9
7
  /** Human-readable name for the key (must be unique within the account). */
10
8
  readonly keyName: string;
11
9
  /** Optional duration in seconds before the key expires. Omit for a key that never expires. */
12
10
  readonly validDurationInSeconds?: number;
13
- /** Optional bucket restriction. When set, the key only grants access to this bucket. */
14
- readonly bucketId?: BucketId;
15
11
  /** Optional file name prefix restriction. When set, the key only grants access to files with this prefix. */
16
12
  readonly namePrefix?: string;
17
13
  }
14
+ /** Mutually exclusive bucket scope fields for key creation. */
15
+ export type CreateKeyBucketScope = {
16
+ /**
17
+ * Optional bucket restrictions. A bucket list restricts the key to those
18
+ * buckets; null or omitted grants access to all buckets.
19
+ */
20
+ readonly bucketIds?: readonly BucketId[] | null;
21
+ /** @deprecated Use `bucketIds: [bucketId]` instead. */
22
+ readonly bucketId?: never;
23
+ } | {
24
+ /**
25
+ * Single-bucket restriction.
26
+ *
27
+ * @deprecated Use `bucketIds: [bucketId]` instead.
28
+ */
29
+ readonly bucketId: BucketId;
30
+ /** Do not provide `bucketIds` with the deprecated `bucketId` alias. */
31
+ readonly bucketIds?: never;
32
+ };
33
+ /** High-level options for creating an application key. */
34
+ export type CreateKeyOptions = CreateKeyOptionsBase & CreateKeyBucketScope;
35
+ /** Request parameters for the `b2_create_key` API call. Creates a new application key. */
36
+ export type CreateKeyRequest = CreateKeyOptions & {
37
+ /** Account to create the key for. */
38
+ readonly accountId: AccountId;
39
+ };
18
40
  /**
19
41
  * Full application key including the secret, returned only at creation time by `b2_create_key`.
20
42
  * The `applicationKey` secret is never returned again after this response.
@@ -32,7 +54,14 @@ export interface FullApplicationKey {
32
54
  readonly accountId: AccountId;
33
55
  /** UTC timestamp (milliseconds) when this key expires, or null if it does not expire. */
34
56
  readonly expirationTimestamp: number | null;
35
- /** Bucket ID this key is restricted to, or null if unrestricted. */
57
+ /** Bucket IDs this key is restricted to, or null if unrestricted. */
58
+ readonly bucketIds: readonly BucketId[] | null;
59
+ /**
60
+ * Bucket ID this key is restricted to when it has exactly one bucket, or null
61
+ * if unrestricted or multi-bucket.
62
+ *
63
+ * @deprecated Use `bucketIds` instead.
64
+ */
36
65
  readonly bucketId: BucketId | null;
37
66
  /** File name prefix this key is restricted to, or null if unrestricted. */
38
67
  readonly namePrefix: string | null;
@@ -53,7 +82,14 @@ export interface ApplicationKey {
53
82
  readonly accountId: AccountId;
54
83
  /** UTC timestamp (milliseconds) when this key expires, or null if it does not expire. */
55
84
  readonly expirationTimestamp: number | null;
56
- /** Bucket ID this key is restricted to, or null if unrestricted. */
85
+ /** Bucket IDs this key is restricted to, or null if unrestricted. */
86
+ readonly bucketIds: readonly BucketId[] | null;
87
+ /**
88
+ * Bucket ID this key is restricted to when it has exactly one bucket, or null
89
+ * if unrestricted or multi-bucket.
90
+ *
91
+ * @deprecated Use `bucketIds` instead.
92
+ */
57
93
  readonly bucketId: BucketId | null;
58
94
  /** File name prefix this key is restricted to, or null if unrestricted. */
59
95
  readonly namePrefix: string | null;