@dynamic-labs-sdk/client 1.33.2 → 1.33.4

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 (223) hide show
  1. package/dist/{apiClient-B0eCQXEJ.native.esm.js → apiClient-BGh68_e6.native.esm.js} +3 -3
  2. package/dist/{apiClient-B0eCQXEJ.native.esm.js.map → apiClient-BGh68_e6.native.esm.js.map} +1 -1
  3. package/dist/core.cjs +5 -78
  4. package/dist/core.cjs.map +1 -1
  5. package/dist/core.esm.js +6 -77
  6. package/dist/core.esm.js.map +1 -1
  7. package/dist/core.native.esm.js +8 -79
  8. package/dist/core.native.esm.js.map +1 -1
  9. package/dist/exports/core.d.ts +0 -2
  10. package/dist/exports/core.d.ts.map +1 -1
  11. package/dist/exports/waas.d.ts +13 -1
  12. package/dist/exports/waas.d.ts.map +1 -1
  13. package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js → getNetworkProviderFromNetworkId-BqiVs3Ni.esm.js} +2 -2
  14. package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js.map → getNetworkProviderFromNetworkId-BqiVs3Ni.esm.js.map} +1 -1
  15. package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs → getNetworkProviderFromNetworkId-C_bqlRFD.cjs} +2 -2
  16. package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs.map → getNetworkProviderFromNetworkId-C_bqlRFD.cjs.map} +1 -1
  17. package/dist/{getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js → getNetworkProviderFromNetworkId-TczZgKDH.native.esm.js} +8 -8
  18. package/dist/getNetworkProviderFromNetworkId-TczZgKDH.native.esm.js.map +1 -0
  19. package/dist/{getSignedSessionId-DdMeCIV-.esm.js → getSignedSessionId-DRJW9tb8.esm.js} +3 -3
  20. package/dist/{getSignedSessionId-DdMeCIV-.esm.js.map → getSignedSessionId-DRJW9tb8.esm.js.map} +1 -1
  21. package/dist/{getSignedSessionId-KiBgLtda.cjs → getSignedSessionId-Dc6_q9ph.cjs} +3 -3
  22. package/dist/{getSignedSessionId-KiBgLtda.cjs.map → getSignedSessionId-Dc6_q9ph.cjs.map} +1 -1
  23. package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js → getSignedSessionId-h-zAmDnk.native.esm.js} +3 -3
  24. package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js.map → getSignedSessionId-h-zAmDnk.native.esm.js.map} +1 -1
  25. package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js → getVerifiedCredentialForWalletAccount-BWtWpYjd.esm.js} +2 -2
  26. package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js.map → getVerifiedCredentialForWalletAccount-BWtWpYjd.esm.js.map} +1 -1
  27. package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs → getVerifiedCredentialForWalletAccount-CgI__iTv.cjs} +2 -2
  28. package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs.map → getVerifiedCredentialForWalletAccount-CgI__iTv.cjs.map} +1 -1
  29. package/dist/index.cjs +8 -8
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.esm.js +8 -8
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/index.native.esm.js +10 -10
  34. package/dist/index.native.esm.js.map +1 -1
  35. package/dist/{isMfaRequiredForAction-By7uHgpn.cjs → isMfaRequiredForAction-Aov24tU3.cjs} +2 -2
  36. package/dist/{isMfaRequiredForAction-By7uHgpn.cjs.map → isMfaRequiredForAction-Aov24tU3.cjs.map} +1 -1
  37. package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js → isMfaRequiredForAction-FW_GM4tb.native.esm.js} +2 -2
  38. package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js.map → isMfaRequiredForAction-FW_GM4tb.native.esm.js.map} +1 -1
  39. package/dist/{isMfaRequiredForAction-BLegdReE.esm.js → isMfaRequiredForAction-mcAjTfRu.esm.js} +2 -2
  40. package/dist/{isMfaRequiredForAction-BLegdReE.esm.js.map → isMfaRequiredForAction-mcAjTfRu.esm.js.map} +1 -1
  41. package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js → isUserOnboardingComplete-BTvFsIW7.esm.js} +3 -3
  42. package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js.map → isUserOnboardingComplete-BTvFsIW7.esm.js.map} +1 -1
  43. package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js → isUserOnboardingComplete-BzEm_9UF.native.esm.js} +3 -3
  44. package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js.map → isUserOnboardingComplete-BzEm_9UF.native.esm.js.map} +1 -1
  45. package/dist/{isUserOnboardingComplete-DMefkHRY.cjs → isUserOnboardingComplete-Deq_CabI.cjs} +3 -3
  46. package/dist/{isUserOnboardingComplete-DMefkHRY.cjs.map → isUserOnboardingComplete-Deq_CabI.cjs.map} +1 -1
  47. package/dist/{logoutWithReason-c1DmyRBx.cjs → logoutWithReason-BqgbyO5j.cjs} +30 -4
  48. package/dist/logoutWithReason-BqgbyO5j.cjs.map +1 -0
  49. package/dist/{logoutWithReason-B-cf-dUs.esm.js → logoutWithReason-Demgc354.esm.js} +25 -5
  50. package/dist/logoutWithReason-Demgc354.esm.js.map +1 -0
  51. package/dist/{logoutWithReason-C4AgSbjv.native.esm.js → logoutWithReason-rupibyb3.native.esm.js} +24 -4
  52. package/dist/logoutWithReason-rupibyb3.native.esm.js.map +1 -0
  53. package/dist/{migrateFromFireblocks-RCqy2qOG.cjs → migrateFromFireblocks-C1El-Dce.cjs} +2 -2
  54. package/dist/{migrateFromFireblocks-RCqy2qOG.cjs.map → migrateFromFireblocks-C1El-Dce.cjs.map} +1 -1
  55. package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js → migrateFromFireblocks-Cc6JO6e2.native.esm.js} +2 -2
  56. package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js.map → migrateFromFireblocks-Cc6JO6e2.native.esm.js.map} +1 -1
  57. package/dist/{migrateFromFireblocks-B76sFd7a.esm.js → migrateFromFireblocks-DSgWzuHJ.esm.js} +2 -2
  58. package/dist/{migrateFromFireblocks-B76sFd7a.esm.js.map → migrateFromFireblocks-DSgWzuHJ.esm.js.map} +1 -1
  59. package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts +20 -0
  60. package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts.map +1 -0
  61. package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts +2 -0
  62. package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts.map +1 -0
  63. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +39 -6
  64. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -1
  65. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +9 -3
  66. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
  67. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +10 -3
  68. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  69. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts +43 -0
  70. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts.map +1 -0
  71. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts +2 -0
  72. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts.map +1 -0
  73. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +249 -0
  74. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
  75. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts +45 -0
  76. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts.map +1 -0
  77. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts +2 -0
  78. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts.map +1 -0
  79. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts +41 -0
  80. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts.map +1 -0
  81. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts +2 -0
  82. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts.map +1 -0
  83. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts +39 -0
  84. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts.map +1 -0
  85. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts +2 -0
  86. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts.map +1 -0
  87. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts +30 -0
  88. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts.map +1 -0
  89. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts +2 -0
  90. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts.map +1 -0
  91. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts +2 -0
  92. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts.map +1 -0
  93. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts +26 -0
  94. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts.map +1 -0
  95. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts +2 -0
  96. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts.map +1 -0
  97. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts +21 -0
  98. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts.map +1 -0
  99. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts +2 -0
  100. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts.map +1 -0
  101. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts +26 -0
  102. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts.map +1 -0
  103. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +11 -2
  104. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -1
  105. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +11 -2
  106. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -1
  107. package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts +12 -4
  108. package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts.map +1 -1
  109. package/dist/modules/waas/businessAccounts/resendFields.d.ts +39 -0
  110. package/dist/modules/waas/businessAccounts/resendFields.d.ts.map +1 -0
  111. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts +2 -0
  112. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts.map +1 -0
  113. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts +49 -0
  114. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts.map +1 -0
  115. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts +11 -2
  116. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
  117. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +11 -2
  118. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
  119. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts +2 -0
  120. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts.map +1 -0
  121. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts +29 -0
  122. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts.map +1 -0
  123. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts +2 -0
  124. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts.map +1 -0
  125. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts +29 -0
  126. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts.map +1 -0
  127. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/createResilientIndexedDbStore.d.ts +44 -0
  128. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/createResilientIndexedDbStore.d.ts.map +1 -0
  129. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/index.d.ts +2 -0
  130. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/index.d.ts.map +1 -0
  131. package/dist/services/resilientIndexedDbStore/errors/TransactionNotCompletedError.d.ts +5 -0
  132. package/dist/services/resilientIndexedDbStore/errors/TransactionNotCompletedError.d.ts.map +1 -0
  133. package/dist/services/resilientIndexedDbStore/resilientIndexedDbStore.types.d.ts +79 -0
  134. package/dist/services/resilientIndexedDbStore/resilientIndexedDbStore.types.d.ts.map +1 -0
  135. package/dist/services/resilientIndexedDbStore/utils/applyMutation/applyMutation.d.ts +29 -0
  136. package/dist/services/resilientIndexedDbStore/utils/applyMutation/applyMutation.d.ts.map +1 -0
  137. package/dist/services/resilientIndexedDbStore/utils/applyMutation/index.d.ts +2 -0
  138. package/dist/services/resilientIndexedDbStore/utils/applyMutation/index.d.ts.map +1 -0
  139. package/dist/services/resilientIndexedDbStore/utils/constants.d.ts +24 -0
  140. package/dist/services/resilientIndexedDbStore/utils/constants.d.ts.map +1 -0
  141. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/createTombstoneStore.d.ts +61 -0
  142. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/createTombstoneStore.d.ts.map +1 -0
  143. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/index.d.ts +3 -0
  144. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/index.d.ts.map +1 -0
  145. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/createWorkQueue.d.ts +60 -0
  146. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/createWorkQueue.d.ts.map +1 -0
  147. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/index.d.ts +3 -0
  148. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/index.d.ts.map +1 -0
  149. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/deleteRecord.d.ts +35 -0
  150. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/deleteRecord.d.ts.map +1 -0
  151. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/index.d.ts +2 -0
  152. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/index.d.ts.map +1 -0
  153. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/getBackoffDelay.d.ts +22 -0
  154. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/getBackoffDelay.d.ts.map +1 -0
  155. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/index.d.ts +2 -0
  156. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/index.d.ts.map +1 -0
  157. package/dist/services/resilientIndexedDbStore/utils/getRecord/getRecord.d.ts +32 -0
  158. package/dist/services/resilientIndexedDbStore/utils/getRecord/getRecord.d.ts.map +1 -0
  159. package/dist/services/resilientIndexedDbStore/utils/getRecord/index.d.ts +2 -0
  160. package/dist/services/resilientIndexedDbStore/utils/getRecord/index.d.ts.map +1 -0
  161. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/getRecordKey.d.ts +27 -0
  162. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/getRecordKey.d.ts.map +1 -0
  163. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/index.d.ts +2 -0
  164. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/index.d.ts.map +1 -0
  165. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/getTransactionError.d.ts +28 -0
  166. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/getTransactionError.d.ts.map +1 -0
  167. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/index.d.ts +2 -0
  168. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/index.d.ts.map +1 -0
  169. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/index.d.ts +2 -0
  170. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/index.d.ts.map +1 -0
  171. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/isPermanentWriteError.d.ts +20 -0
  172. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/isPermanentWriteError.d.ts.map +1 -0
  173. package/dist/services/resilientIndexedDbStore/utils/openDatabase/index.d.ts +2 -0
  174. package/dist/services/resilientIndexedDbStore/utils/openDatabase/index.d.ts.map +1 -0
  175. package/dist/services/resilientIndexedDbStore/utils/openDatabase/openDatabase.d.ts +31 -0
  176. package/dist/services/resilientIndexedDbStore/utils/openDatabase/openDatabase.d.ts.map +1 -0
  177. package/dist/services/resilientIndexedDbStore/utils/putRecord/index.d.ts +2 -0
  178. package/dist/services/resilientIndexedDbStore/utils/putRecord/index.d.ts.map +1 -0
  179. package/dist/services/resilientIndexedDbStore/utils/putRecord/putRecord.d.ts +37 -0
  180. package/dist/services/resilientIndexedDbStore/utils/putRecord/putRecord.d.ts.map +1 -0
  181. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/index.d.ts +2 -0
  182. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/index.d.ts.map +1 -0
  183. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/readStoredValue.d.ts +42 -0
  184. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/readStoredValue.d.ts.map +1 -0
  185. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/index.d.ts +2 -0
  186. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/index.d.ts.map +1 -0
  187. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/replayTombstones.d.ts +31 -0
  188. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/replayTombstones.d.ts.map +1 -0
  189. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/index.d.ts +2 -0
  190. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/index.d.ts.map +1 -0
  191. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/runWithTimeout.d.ts +34 -0
  192. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/runWithTimeout.d.ts.map +1 -0
  193. package/dist/services/resilientIndexedDbStore/utils/withDatabase/index.d.ts +2 -0
  194. package/dist/services/resilientIndexedDbStore/utils/withDatabase/index.d.ts.map +1 -0
  195. package/dist/services/resilientIndexedDbStore/utils/withDatabase/withDatabase.d.ts +39 -0
  196. package/dist/services/resilientIndexedDbStore/utils/withDatabase/withDatabase.d.ts.map +1 -0
  197. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  198. package/dist/utils/retryOnFail/retryOnFail.d.ts.map +1 -1
  199. package/dist/utils/retryOnFetchError/retryOnFetchError.d.ts.map +1 -1
  200. package/dist/utils/waitForDelay/index.d.ts +2 -0
  201. package/dist/utils/waitForDelay/index.d.ts.map +1 -0
  202. package/dist/utils/waitForDelay/waitForDelay.d.ts +21 -0
  203. package/dist/utils/waitForDelay/waitForDelay.d.ts.map +1 -0
  204. package/dist/{waas-H5xyBfTI.esm.js → waas-BAcC_ZEU.esm.js} +688 -26
  205. package/dist/waas-BAcC_ZEU.esm.js.map +1 -0
  206. package/dist/{waas-DIlnOHm6.native.esm.js → waas-BnBxnaH4.native.esm.js} +688 -26
  207. package/dist/waas-BnBxnaH4.native.esm.js.map +1 -0
  208. package/dist/{waas-7vSYuH3H.cjs → waas-EJACWt9Q.cjs} +764 -24
  209. package/dist/waas-EJACWt9Q.cjs.map +1 -0
  210. package/dist/waas.cjs +18 -5
  211. package/dist/waas.esm.js +5 -5
  212. package/dist/waas.native.esm.js +5 -5
  213. package/dist/waasCore.cjs +5 -5
  214. package/dist/waasCore.esm.js +5 -5
  215. package/dist/waasCore.native.esm.js +5 -5
  216. package/package.json +3 -4
  217. package/dist/getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js.map +0 -1
  218. package/dist/logoutWithReason-B-cf-dUs.esm.js.map +0 -1
  219. package/dist/logoutWithReason-C4AgSbjv.native.esm.js.map +0 -1
  220. package/dist/logoutWithReason-c1DmyRBx.cjs.map +0 -1
  221. package/dist/waas-7vSYuH3H.cjs.map +0 -1
  222. package/dist/waas-DIlnOHm6.native.esm.js.map +0 -1
  223. package/dist/waas-H5xyBfTI.esm.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ import type { Storage } from '../../../storage/storage.types';
2
+ type CreateTombstoneStoreParams = {
3
+ /** Name of the IndexedDB database the tombstones belong to. */
4
+ dbName: string;
5
+ /** Persists deletions that IndexedDB has not acknowledged. */
6
+ storage: Storage;
7
+ /** Name of the object store the tombstones belong to. */
8
+ storeName: string;
9
+ };
10
+ export type TombstoneStore = {
11
+ /**
12
+ * Records that a key must be deleted from IndexedDB and resolves once the
13
+ * record is durable. Rejects when storage cannot hold it, since the caller's
14
+ * deletion would not survive a reload.
15
+ */
16
+ add: (params: {
17
+ key: string;
18
+ }) => Promise<void>;
19
+ /** Keys whose deletion has not been confirmed by IndexedDB yet. */
20
+ list: () => Promise<string[]>;
21
+ /** Drops the record for a key whose deletion has landed and resolves once it is removed. */
22
+ remove: (params: {
23
+ key: string;
24
+ }) => Promise<void>;
25
+ /** Resolves once queued tombstone work has settled. */
26
+ waitUntilIdle: () => Promise<void>;
27
+ };
28
+ /**
29
+ * Durable record of deletions that IndexedDB has not acknowledged, held in
30
+ * the storage service so they outlive the page.
31
+ *
32
+ * Only deletions are persisted, and only as keys. A value may hold types that
33
+ * cannot be serialized, so a pending write has nothing to persist and degrades
34
+ * to the value being absent. A pending deletion, on the other hand, must
35
+ * outlive the page: a value the caller was told is gone would otherwise
36
+ * resurface in the next instance.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const tombstones = createTombstoneStore({
41
+ * dbName: 'dynamic_keychain',
42
+ * storage,
43
+ * storeName: 'keys',
44
+ * });
45
+ *
46
+ * tombstones.add({ key: 'session' });
47
+ * await tombstones.list(); // ['session']
48
+ * tombstones.remove({ key: 'session' });
49
+ * ```
50
+ *
51
+ * @param params.dbName - Name of the IndexedDB database the tombstones belong to.
52
+ * @param params.storage - Persists deletions that IndexedDB has not acknowledged.
53
+ * @param params.storeName - Name of the object store the tombstones belong to.
54
+ * @returns A store for reading and updating pending deletions.
55
+ * @see createWorkQueue
56
+ * @see createResilientIndexedDbStore
57
+ * @notInstrumented
58
+ */
59
+ export declare const createTombstoneStore: ({ dbName, storage, storeName, }: CreateTombstoneStoreParams) => TombstoneStore;
60
+ export {};
61
+ //# sourceMappingURL=createTombstoneStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTombstoneStore.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/createTombstoneStore/createTombstoneStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,KAAK,0BAA0B,GAAG;IAChC,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IAEf,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IAEjB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;OAIG;IACH,GAAG,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD,mEAAmE;IACnE,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE9B,4FAA4F;IAC5F,MAAM,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,uDAAuD;IACvD,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,oBAAoB,oCAI9B,0BAA0B,KAAG,cAsE/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { createTombstoneStore } from './createTombstoneStore';
2
+ export type { TombstoneStore } from './createTombstoneStore';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/createTombstoneStore/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { Logger } from '../../../logger';
2
+ import type { StoreDatabaseConfig, StoreMutation } from '../../resilientIndexedDbStore.types';
3
+ import type { TombstoneStore } from '../createTombstoneStore';
4
+ type CreateWorkQueueParams = {
5
+ /** Where the store keeps its records. */
6
+ database: StoreDatabaseConfig;
7
+ /** Reports degraded storage. The queue works without it. */
8
+ logger?: Logger;
9
+ /** Durable record of deletions that IndexedDB has not acknowledged. */
10
+ tombstones: TombstoneStore;
11
+ };
12
+ export type WorkQueue<TValue> = {
13
+ /**
14
+ * Registers a mutation and wakes the worker, which writes it to IndexedDB in
15
+ * the background. Resolves once a deletion is durably recorded, and rejects
16
+ * when it cannot be, since the caller would otherwise be told of a deletion
17
+ * that a reload undoes.
18
+ */
19
+ enqueue: (params: {
20
+ mutation: StoreMutation<TValue>;
21
+ }) => Promise<void>;
22
+ /** The mutation still waiting to be written for a key, if any. */
23
+ getPending: (params: {
24
+ key: string;
25
+ }) => StoreMutation<TValue> | undefined;
26
+ /** Resolves once queued mutations and tombstones settle. */
27
+ waitUntilIdle: () => Promise<void>;
28
+ };
29
+ /**
30
+ * Queue of pending mutations drained by one worker, retrying on backoff until
31
+ * each mutation lands in IndexedDB.
32
+ *
33
+ * Callers never wait on IndexedDB: a mutation is acknowledged as soon as it is
34
+ * queued, which keeps an interaction alive through transient connection
35
+ * closures mobile WebKit performs under memory pressure. At most one mutation
36
+ * is pending per key, since only the final state of a key is observable.
37
+ *
38
+ * Work IndexedDB rejects on its input is given up on instead of retried, since
39
+ * no amount of retrying makes that input valid and the caller would otherwise
40
+ * wait on it forever.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const queue = createWorkQueue<StoredKey>({ database, tombstones });
45
+ *
46
+ * queue.enqueue({ mutation: { key: 'session', type: 'set', value } });
47
+ * queue.getPending({ key: 'session' });
48
+ * ```
49
+ *
50
+ * @param params.database - Where the store keeps its records.
51
+ * @param params.logger - Reports degraded storage.
52
+ * @param params.tombstones - Durable record of unacknowledged deletions.
53
+ * @returns The queue used to register and inspect pending mutations.
54
+ * @see createTombstoneStore
55
+ * @see applyMutation
56
+ * @notInstrumented
57
+ */
58
+ export declare const createWorkQueue: <TValue>({ database, logger, tombstones, }: CreateWorkQueueParams) => WorkQueue<TValue>;
59
+ export {};
60
+ //# sourceMappingURL=createWorkQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createWorkQueue.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/createWorkQueue/createWorkQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAO9D,KAAK,qBAAqB,GAAG;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uEAAuE;IACvE,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAgBF,MAAM,MAAM,SAAS,CAAC,MAAM,IAAI;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE,kEAAkE;IAClE,UAAU,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAE3E,4DAA4D;IAC5D,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,qCAInC,qBAAqB,KAAG,SAAS,CAAC,MAAM,CAqJ1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { createWorkQueue } from './createWorkQueue';
2
+ export type { WorkQueue } from './createWorkQueue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/createWorkQueue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,35 @@
1
+ type DeleteRecordParams = {
2
+ /** An open connection to the store's database. */
3
+ db: IDBDatabase;
4
+ /** Key of the record to delete. */
5
+ key: string;
6
+ /** Name of the object store to delete from. */
7
+ storeName: string;
8
+ };
9
+ /**
10
+ * Deletes a single record from an object store, resolving once the transaction
11
+ * commits.
12
+ *
13
+ * A successful request only means the deletion ran inside the transaction, and
14
+ * a transaction can still abort after that, so the caller learns the record is
15
+ * gone only once IndexedDB has committed it.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * await deleteRecord({ db, key: 'session', storeName: 'keys' });
20
+ * ```
21
+ *
22
+ * @param params.db - An open connection to the store's database.
23
+ * @param params.key - Key of the record to delete.
24
+ * @param params.storeName - Name of the object store to delete from.
25
+ * @returns A promise that resolves once the deletion is committed.
26
+ * @throws When IndexedDB rejects the deletion or the transaction does not
27
+ * commit.
28
+ * @see getTransactionError
29
+ * @see withDatabase
30
+ * @see applyMutation
31
+ * @notInstrumented
32
+ */
33
+ export declare const deleteRecord: ({ db, key, storeName, }: DeleteRecordParams) => Promise<void>;
34
+ export {};
35
+ //# sourceMappingURL=deleteRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteRecord.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/deleteRecord/deleteRecord.ts"],"names":[],"mappings":"AAEA,KAAK,kBAAkB,GAAG;IACxB,kDAAkD;IAClD,EAAE,EAAE,WAAW,CAAC;IAEhB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IAEZ,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY,4BAItB,kBAAkB,KAAG,OAAO,CAAC,IAAI,CAShC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { deleteRecord } from './deleteRecord';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/deleteRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,22 @@
1
+ type GetBackoffDelayParams = {
2
+ /** How many attempts have already failed. */
3
+ attempt: number;
4
+ };
5
+ /**
6
+ * Exponential backoff between IndexedDB attempts, capped so a caller waiting
7
+ * on a read never sits through a multi-second gap.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * await waitForDelay({ delayMs: getBackoffDelay({ attempt: 3 }) });
12
+ * ```
13
+ *
14
+ * @param params.attempt - How many attempts have already failed.
15
+ * @returns The delay in milliseconds to wait before the next attempt.
16
+ * @see waitForDelay
17
+ * @see readStoredValue
18
+ * @notInstrumented
19
+ */
20
+ export declare const getBackoffDelay: ({ attempt }: GetBackoffDelayParams) => number;
21
+ export {};
22
+ //# sourceMappingURL=getBackoffDelay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBackoffDelay.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getBackoffDelay/getBackoffDelay.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IAC3B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,gBAAiB,qBAAqB,KAAG,MAIpE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getBackoffDelay } from './getBackoffDelay';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getBackoffDelay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,32 @@
1
+ type GetRecordParams = {
2
+ /** An open connection to the store's database. */
3
+ db: IDBDatabase;
4
+ /** Key of the record to read. */
5
+ key: string;
6
+ /** Name of the object store to read from. */
7
+ storeName: string;
8
+ };
9
+ /**
10
+ * Reads a single record from an object store.
11
+ *
12
+ * Values come back exactly as they were written, through structured clone, so
13
+ * types that cannot be serialized (such as a non-extractable `CryptoKey`)
14
+ * survive the round trip.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const record = await getRecord<StoredKey>({ db, key: 'session', storeName: 'keys' });
19
+ * ```
20
+ *
21
+ * @param params.db - An open connection to the store's database.
22
+ * @param params.key - Key of the record to read.
23
+ * @param params.storeName - Name of the object store to read from.
24
+ * @returns The stored value, or undefined when the key has no record.
25
+ * @throws When IndexedDB rejects the read.
26
+ * @see withDatabase
27
+ * @see readStoredValue
28
+ * @notInstrumented
29
+ */
30
+ export declare const getRecord: <TValue>({ db, key, storeName, }: GetRecordParams) => Promise<TValue | undefined>;
31
+ export {};
32
+ //# sourceMappingURL=getRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getRecord/getRecord.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,kDAAkD;IAClD,EAAE,EAAE,WAAW,CAAC;IAEhB,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IAEZ,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,2BAI7B,eAAe,KAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAQ3C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getRecord } from './getRecord';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,27 @@
1
+ type GetRecordKeyParams<TValue> = {
2
+ /** Property of a value that holds its key. */
3
+ keyPath: string;
4
+ /** The value to read the key from. */
5
+ value: TValue;
6
+ };
7
+ /**
8
+ * The key IndexedDB stores a value under, read from the value itself.
9
+ *
10
+ * A value whose key path holds no string has no key to be stored under, so the
11
+ * caller learns that before IndexedDB rejects the write.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const key = getRecordKey({ keyPath: 'keyName', value: storedKey });
16
+ * ```
17
+ *
18
+ * @param params.keyPath - Property of a value that holds its key.
19
+ * @param params.value - The value to read the key from.
20
+ * @returns The key, or undefined when the key path holds no string.
21
+ * @see createResilientIndexedDbStore
22
+ * @see putRecord
23
+ * @notInstrumented
24
+ */
25
+ export declare const getRecordKey: <TValue>({ keyPath, value, }: GetRecordKeyParams<TValue>) => string | undefined;
26
+ export {};
27
+ //# sourceMappingURL=getRecordKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRecordKey.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getRecordKey/getRecordKey.ts"],"names":[],"mappings":"AAAA,KAAK,kBAAkB,CAAC,MAAM,IAAI;IAChC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAEhB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,uBAGhC,kBAAkB,CAAC,MAAM,CAAC,KAAG,MAAM,GAAG,SAcxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getRecordKey } from './getRecordKey';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getRecordKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,28 @@
1
+ type GetTransactionErrorParams = {
2
+ /** The request that ran inside the transaction. */
3
+ request: IDBRequest;
4
+ /** The transaction that failed or was aborted. */
5
+ transaction: IDBTransaction;
6
+ };
7
+ /**
8
+ * The reason a write transaction did not commit.
9
+ *
10
+ * A transaction aborted by the browser rather than by a failing request, as
11
+ * happens when a connection closes mid-transaction, carries no error on either
12
+ * object, so the caller still gets something to log and retry on.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * transaction.onabort = () => reject(getTransactionError({ request, transaction }));
17
+ * ```
18
+ *
19
+ * @param params.request - The request that ran inside the transaction.
20
+ * @param params.transaction - The transaction that failed or was aborted.
21
+ * @returns The error to reject the write with.
22
+ * @see putRecord
23
+ * @see deleteRecord
24
+ * @notInstrumented
25
+ */
26
+ export declare const getTransactionError: ({ request, transaction, }: GetTransactionErrorParams) => Error;
27
+ export {};
28
+ //# sourceMappingURL=getTransactionError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionError.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getTransactionError/getTransactionError.ts"],"names":[],"mappings":"AAEA,KAAK,yBAAyB,GAAG;IAC/B,mDAAmD;IACnD,OAAO,EAAE,UAAU,CAAC;IAEpB,kDAAkD;IAClD,WAAW,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,8BAG7B,yBAAyB,KAAG,KAQ9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getTransactionError } from './getTransactionError';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/getTransactionError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isPermanentWriteError } from './isPermanentWriteError';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/isPermanentWriteError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Whether IndexedDB rejected a write because of what it was asked to write,
3
+ * which tells a retrying caller to give the write up instead of repeating it
4
+ * for as long as the process lives.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * if (isPermanentWriteError(error)) {
9
+ * logger?.debug('Dropping a mutation IndexedDB will never accept', error);
10
+ * }
11
+ * ```
12
+ *
13
+ * @param error - Whatever the write rejected with.
14
+ * @returns Whether repeating the write is pointless.
15
+ * @see createWorkQueue
16
+ * @see applyMutation
17
+ * @notInstrumented
18
+ */
19
+ export declare const isPermanentWriteError: (error: unknown) => boolean;
20
+ //# sourceMappingURL=isPermanentWriteError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPermanentWriteError.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/isPermanentWriteError/isPermanentWriteError.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB,UAAW,OAAO,KAAG,OACiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { openDatabase } from './openDatabase';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/openDatabase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { StoreDatabaseConfig } from '../../resilientIndexedDbStore.types';
2
+ type OpenDatabaseParams = {
3
+ /** Where the store keeps its records. */
4
+ database: StoreDatabaseConfig;
5
+ };
6
+ /**
7
+ * Opens the store's IndexedDB connection, recovering from a corrupted schema.
8
+ *
9
+ * If the database exists but is missing the expected object store (an upgrade
10
+ * interrupted by a reload on iOS WebKit leaves the database committed at its
11
+ * version with the store creation rolled back), it reopens at the next version
12
+ * so `onupgradeneeded` fires and recreates only the missing store. Stored data
13
+ * is preserved: the database is never deleted.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const db = await openDatabase({
18
+ * database: { dbName: 'dynamic_keychain', keyPath: 'keyName', storeName: 'keys' },
19
+ * });
20
+ * ```
21
+ *
22
+ * @param params.database - Where the store keeps its records.
23
+ * @returns An open connection whose object store is guaranteed to exist.
24
+ * @throws When IndexedDB refuses to open the database.
25
+ * @see withDatabase
26
+ * @see createResilientIndexedDbStore
27
+ * @notInstrumented
28
+ */
29
+ export declare const openDatabase: ({ database, }: OpenDatabaseParams) => Promise<IDBDatabase>;
30
+ export {};
31
+ //# sourceMappingURL=openDatabase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openDatabase.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/openDatabase/openDatabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,KAAK,kBAAkB,GAAG;IACxB,yCAAyC;IACzC,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,CAAC;AAmCF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,kBAEtB,kBAAkB,KAAG,OAAO,CAAC,WAAW,CAe1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { putRecord } from './putRecord';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/putRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,37 @@
1
+ type PutRecordParams<TValue> = {
2
+ /** An open connection to the store's database. */
3
+ db: IDBDatabase;
4
+ /** Name of the object store to write to. */
5
+ storeName: string;
6
+ /** The value to write. It carries its own key under the store's key path. */
7
+ value: TValue;
8
+ };
9
+ /**
10
+ * Writes a single record to an object store, resolving once the transaction
11
+ * commits.
12
+ *
13
+ * A successful request only means the write ran inside the transaction, and a
14
+ * transaction can still abort after that, so the caller learns the value is
15
+ * stored only once IndexedDB has committed it.
16
+ *
17
+ * The value is written as it is, through structured clone, so types that cannot
18
+ * be serialized (such as a non-extractable `CryptoKey`) survive the round trip.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * await putRecord({ db, storeName: 'keys', value: storedKey });
23
+ * ```
24
+ *
25
+ * @param params.db - An open connection to the store's database.
26
+ * @param params.storeName - Name of the object store to write to.
27
+ * @param params.value - The value to write.
28
+ * @returns A promise that resolves once the write is committed.
29
+ * @throws When IndexedDB rejects the write or the transaction does not commit.
30
+ * @see getTransactionError
31
+ * @see withDatabase
32
+ * @see applyMutation
33
+ * @notInstrumented
34
+ */
35
+ export declare const putRecord: <TValue>({ db, storeName, value, }: PutRecordParams<TValue>) => Promise<void>;
36
+ export {};
37
+ //# sourceMappingURL=putRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"putRecord.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/putRecord/putRecord.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,MAAM,IAAI;IAC7B,kDAAkD;IAClD,EAAE,EAAE,WAAW,CAAC;IAEhB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAElB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,6BAI7B,eAAe,CAAC,MAAM,CAAC,KAAG,OAAO,CAAC,IAAI,CASrC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { readStoredValue } from './readStoredValue';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/readStoredValue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { StoreDatabaseConfig, StoreReadResult } from '../../resilientIndexedDbStore.types';
2
+ type ReadStoredValueParams = {
3
+ /** Where the store keeps its records. */
4
+ database: StoreDatabaseConfig;
5
+ /** Key of the value to read. */
6
+ key: string;
7
+ /** How long the read may keep retrying before reporting unavailability. */
8
+ timeoutMs: number;
9
+ };
10
+ /**
11
+ * Reads a value from IndexedDB, retrying with backoff while the database is
12
+ * unusable and resolving deterministically once the timeout budget is spent.
13
+ *
14
+ * Each attempt is bounded by whatever is left of the budget, so an open the
15
+ * browser leaves blocked and a request it never settles both end the read
16
+ * within the budget instead of holding it forever.
17
+ *
18
+ * The caller is usually a user waiting on an interaction, so the result is
19
+ * always one of found, absent, or unavailable: never a hanging promise and
20
+ * never a thrown IndexedDB error.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const result = await readStoredValue<StoredKey>({
25
+ * database,
26
+ * key: 'session',
27
+ * timeoutMs: DEFAULT_READ_TIMEOUT_MS,
28
+ * });
29
+ * ```
30
+ *
31
+ * @param params.database - Where the store keeps its records.
32
+ * @param params.key - Key of the value to read.
33
+ * @param params.timeoutMs - How long the read may keep retrying.
34
+ * @returns Whether the value was found, is absent, or could not be read.
35
+ * @see createResilientIndexedDbStore
36
+ * @see getBackoffDelay
37
+ * @see runWithTimeout
38
+ * @notInstrumented
39
+ */
40
+ export declare const readStoredValue: <TValue>({ database, key, timeoutMs, }: ReadStoredValueParams) => Promise<StoreReadResult<TValue>>;
41
+ export {};
42
+ //# sourceMappingURL=readStoredValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readStoredValue.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/readStoredValue/readStoredValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,qBAAqB,GAAG;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAC;IAEZ,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,eAAe,GAAU,MAAM,iCAIzC,qBAAqB,KAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CA+BzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { replayTombstones } from './replayTombstones';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/replayTombstones/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Logger } from '../../../logger';
2
+ import type { TombstoneStore } from '../createTombstoneStore';
3
+ import type { WorkQueue } from '../createWorkQueue';
4
+ type ReplayTombstonesParams<TValue> = {
5
+ /** Reports degraded storage. */
6
+ logger?: Logger;
7
+ /** Queue the deletions are registered with. */
8
+ queue: WorkQueue<TValue>;
9
+ /** Durable record of deletions that IndexedDB has not acknowledged. */
10
+ tombstones: TombstoneStore;
11
+ };
12
+ /**
13
+ * Re-queues the deletions an earlier instance recorded but IndexedDB never
14
+ * acknowledged, so a value the caller was told is gone cannot come back.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * await replayTombstones({ logger, queue, tombstones });
19
+ * ```
20
+ *
21
+ * @param params.logger - Reports degraded storage.
22
+ * @param params.queue - Queue the deletions are registered with.
23
+ * @param params.tombstones - Durable record of unacknowledged deletions.
24
+ * @returns A promise that resolves once the deletions are queued.
25
+ * @see createResilientIndexedDbStore
26
+ * @see createTombstoneStore
27
+ * @notInstrumented
28
+ */
29
+ export declare const replayTombstones: <TValue>({ logger, queue, tombstones, }: ReplayTombstonesParams<TValue>) => Promise<void>;
30
+ export {};
31
+ //# sourceMappingURL=replayTombstones.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replayTombstones.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/replayTombstones/replayTombstones.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,KAAK,sBAAsB,CAAC,MAAM,IAAI;IACpC,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEzB,uEAAuE;IACvE,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAU,MAAM,kCAI1C,sBAAsB,CAAC,MAAM,CAAC,KAAG,OAAO,CAAC,IAAI,CAgB/C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { runWithTimeout } from './runWithTimeout';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/resilientIndexedDbStore/utils/runWithTimeout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,34 @@
1
+ type RunWithTimeoutParams<TResult> = {
2
+ /** Runs when the budget is spent, to release what the operation acquired. */
3
+ onTimeout?: () => void;
4
+ /** Work that may never settle. */
5
+ operation: Promise<TResult>;
6
+ /** How long the operation may take before it is given up on. */
7
+ timeoutMs: number;
8
+ };
9
+ /**
10
+ * Bounds work that may never settle, which an IndexedDB request can do: an
11
+ * open blocked by another connection emits neither success nor error, and a
12
+ * request on a connection the browser closed can stay pending.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const db = await runWithTimeout({
17
+ * operation: openDatabase({ database }),
18
+ * timeoutMs: DATABASE_OPERATION_TIMEOUT_MS,
19
+ * });
20
+ * ```
21
+ *
22
+ * @param params.onTimeout - Runs when the budget is spent.
23
+ * @param params.operation - Work that may never settle.
24
+ * @param params.timeoutMs - How long the operation may take.
25
+ * @returns Whatever the operation resolves with.
26
+ * @throws A `TimeoutError` `DOMException` once the budget is spent, or whatever
27
+ * the operation rejects with.
28
+ * @see withDatabase
29
+ * @see createWorkQueue
30
+ * @notInstrumented
31
+ */
32
+ export declare const runWithTimeout: <TResult>({ onTimeout, operation, timeoutMs, }: RunWithTimeoutParams<TResult>) => Promise<TResult>;
33
+ export {};
34
+ //# sourceMappingURL=runWithTimeout.d.ts.map