@seedprotocol/sdk 0.7.7 → 0.7.8-next.1066.gac32194

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 (302) hide show
  1. package/dist/{ClientManager-2GtDWHq6.js → ClientManager-Dcju5x4k.js} +835 -80
  2. package/dist/ClientManager-Dcju5x4k.js.map +1 -0
  3. package/dist/{Item-D6j0IvBP.js → Item-DZfNz7xl.js} +2145 -1354
  4. package/dist/Item-DZfNz7xl.js.map +1 -0
  5. package/dist/{ModelProperty-B52C3CQ2.js → ModelProperty-sMGL-_LK.js} +51 -52
  6. package/dist/ModelProperty-sMGL-_LK.js.map +1 -0
  7. package/dist/{Schema-O1QLoXv6.js → Schema-D-TczaIj.js} +106 -91
  8. package/dist/Schema-D-TczaIj.js.map +1 -0
  9. package/dist/{SchemaValidationService-BxCbfDaI.js → SchemaValidationService-NYTtSCxd.js} +6 -6
  10. package/dist/{SchemaValidationService-BxCbfDaI.js.map → SchemaValidationService-NYTtSCxd.js.map} +1 -1
  11. package/dist/{backfillMetadataPropertyIds-CzSbuucw.js → backfillMetadataPropertyIds-DEvD0OAT.js} +3 -3
  12. package/dist/{backfillMetadataPropertyIds-CzSbuucw.js.map → backfillMetadataPropertyIds-DEvD0OAT.js.map} +1 -1
  13. package/dist/{configurePlatform-Bbpw_R4y.js → configurePlatform-CtA7fydC.js} +2 -2
  14. package/dist/{configurePlatform-Bbpw_R4y.js.map → configurePlatform-CtA7fydC.js.map} +1 -1
  15. package/dist/db/drizzle/0020_add_pending_writes.sql +24 -0
  16. package/dist/db/drizzle/0021_add_pending_write_error_name.sql +1 -0
  17. package/dist/db/drizzle/meta/0020_snapshot.json +1542 -0
  18. package/dist/db/drizzle/meta/0021_snapshot.json +1549 -0
  19. package/dist/db/drizzle/meta/_journal.json +14 -0
  20. package/dist/{detachRowsBeforeDelete-D1TyEMco.js → detachRowsBeforeDelete-CLbBbpX4.js} +2 -2
  21. package/dist/{detachRowsBeforeDelete-D1TyEMco.js.map → detachRowsBeforeDelete-CLbBbpX4.js.map} +1 -1
  22. package/dist/dist/{ClientManager-2GtDWHq6.d.ts → ClientManager-Dcju5x4k.d.ts} +393 -292
  23. package/dist/dist/ClientManager-Dcju5x4k.d.ts.map +1 -0
  24. package/dist/dist/{Item-D6j0IvBP.d.ts → Item-DZfNz7xl.d.ts} +456 -266
  25. package/dist/dist/Item-DZfNz7xl.d.ts.map +1 -0
  26. package/dist/dist/{ModelProperty-B52C3CQ2.d.ts → ModelProperty-sMGL-_LK.d.ts} +1 -1
  27. package/dist/dist/{ModelProperty-B52C3CQ2.d.ts.map → ModelProperty-sMGL-_LK.d.ts.map} +1 -1
  28. package/dist/dist/{Schema-O1QLoXv6.d.ts → Schema-D-TczaIj.d.ts} +11 -4
  29. package/dist/dist/Schema-D-TczaIj.d.ts.map +1 -0
  30. package/dist/dist/{SchemaValidationService-BxCbfDaI.d.ts → SchemaValidationService-NYTtSCxd.d.ts} +1 -1
  31. package/dist/dist/{SchemaValidationService-BxCbfDaI.d.ts.map → SchemaValidationService-NYTtSCxd.d.ts.map} +1 -1
  32. package/dist/dist/{backfillMetadataPropertyIds-CzSbuucw.d.ts → backfillMetadataPropertyIds-DEvD0OAT.d.ts} +1 -1
  33. package/dist/dist/backfillMetadataPropertyIds-DEvD0OAT.d.ts.map +1 -0
  34. package/dist/dist/{configurePlatform-Bbpw_R4y.d.ts → configurePlatform-CtA7fydC.d.ts} +1 -1
  35. package/dist/dist/configurePlatform-CtA7fydC.d.ts.map +1 -0
  36. package/dist/dist/{detachRowsBeforeDelete-D1TyEMco.d.ts → detachRowsBeforeDelete-CLbBbpX4.d.ts} +1 -1
  37. package/dist/dist/detachRowsBeforeDelete-CLbBbpX4.d.ts.map +1 -0
  38. package/dist/dist/{eas-DOdj-EMK.d.ts → eas-CcpQiXum.d.ts} +1 -1
  39. package/dist/dist/eas-CcpQiXum.d.ts.map +1 -0
  40. package/dist/dist/{errors-KM-yq2MD.d.ts → errors-BGk_IJO5.d.ts} +39 -24
  41. package/dist/dist/errors-BGk_IJO5.d.ts.map +1 -0
  42. package/dist/dist/{getItem-Bh0zv-o1.d.ts → getItem-CHSX3aMm.d.ts} +1 -1
  43. package/dist/dist/getItem-CHSX3aMm.d.ts.map +1 -0
  44. package/dist/dist/{getPublishPayload-oH8wJhnH.d.ts → getPublishPayload-DMd4oLir.d.ts} +1 -1
  45. package/dist/dist/getPublishPayload-DMd4oLir.d.ts.map +1 -0
  46. package/dist/dist/{getPublishUploads-Cex-NBe6.d.ts → getPublishUploads-C9FnRG9c.d.ts} +1 -1
  47. package/dist/dist/{getPublishUploads-Cex-NBe6.d.ts.map → getPublishUploads-C9FnRG9c.d.ts.map} +1 -1
  48. package/dist/dist/{index-BbFwftAv.d.ts → index-C--KAWoe.d.ts} +378 -1
  49. package/dist/dist/{index-BbFwftAv.d.ts.map → index-C--KAWoe.d.ts.map} +1 -1
  50. package/dist/dist/{index-DpgQMIRq.d.ts → index-CI0NFf4B.d.ts} +836 -426
  51. package/dist/dist/index-CI0NFf4B.d.ts.map +1 -0
  52. package/dist/dist/{index-BAao3_Po.d.ts → index-Ccmd9_KY.d.ts} +5 -5
  53. package/dist/dist/index-Ccmd9_KY.d.ts.map +1 -0
  54. package/dist/dist/index-l3b6p1Ih.d.ts +14 -0
  55. package/dist/dist/index-l3b6p1Ih.d.ts.map +1 -0
  56. package/dist/dist/{index.browser-nndbVM7z.d.ts → index.browser-kY8M-xUA.d.ts} +2892 -1754
  57. package/dist/dist/{index.browser-nndbVM7z.d.ts.map → index.browser-kY8M-xUA.d.ts.map} +1 -1
  58. package/dist/dist/{index.node-BUfx-JaP.d.ts → index.node-Ba2KbmOq.d.ts} +4125 -2613
  59. package/dist/dist/{index.node-BUfx-JaP.d.ts.map → index.node-Ba2KbmOq.d.ts.map} +1 -1
  60. package/dist/dist/platform.browser.d.ts +2 -2
  61. package/dist/dist/platform.node.d.ts +2 -2
  62. package/dist/dist/{property-BDBvImLs.d.ts → property-CO7pKTWK.d.ts} +3 -3
  63. package/dist/dist/property-CO7pKTWK.d.ts.map +1 -0
  64. package/dist/dist/{propertyValidationRules-BlfLn4rP.d.ts → propertyValidationRules-D5HZy0Bq.d.ts} +1 -1
  65. package/dist/dist/propertyValidationRules-D5HZy0Bq.d.ts.map +1 -0
  66. package/dist/dist/{publishDraftGraph-CLO85LLz.d.ts → publishDraftGraph-B5KPqtbg.d.ts} +1 -1
  67. package/dist/dist/{publishDraftGraph-CLO85LLz.d.ts.map → publishDraftGraph-B5KPqtbg.d.ts.map} +1 -1
  68. package/dist/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts → resetAmbiguousLegacyItemData-77CZ8HT7.d.ts} +1 -1
  69. package/dist/dist/resetAmbiguousLegacyItemData-77CZ8HT7.d.ts.map +1 -0
  70. package/dist/dist/{resolveModelForSyncedSeed-DFr4COc4.d.ts → resolveModelForSyncedSeed-DHOq_FGs.d.ts} +1 -1
  71. package/dist/dist/resolveModelForSyncedSeed-DHOq_FGs.d.ts.map +1 -0
  72. package/dist/dist/{syncDbWithEas-CAOlw3i-.d.ts → syncDbWithEas-BZ6AI-IC.d.ts} +1 -1
  73. package/dist/dist/syncDbWithEas-BZ6AI-IC.d.ts.map +1 -0
  74. package/dist/dist/{tabEvents-DksXwk3X.d.ts → tabEvents-CIlzHSKZ.d.ts} +35 -18
  75. package/dist/dist/tabEvents-CIlzHSKZ.d.ts.map +1 -0
  76. package/dist/dist/{tolerantWebAccess-CEIjFGf0.d.ts → tolerantWebAccess-BwJ8bElF.d.ts} +1 -1
  77. package/dist/dist/{tolerantWebAccess-CEIjFGf0.d.ts.map → tolerantWebAccess-BwJ8bElF.d.ts.map} +1 -1
  78. package/dist/dist/{updateSeedRevokedAt-Cjr35YjE.d.ts → updateSeedRevokedAt-ClxMSXcB.d.ts} +1 -1
  79. package/dist/dist/updateSeedRevokedAt-ClxMSXcB.d.ts.map +1 -0
  80. package/dist/{eas-DOdj-EMK.js → eas-CcpQiXum.js} +4 -4
  81. package/dist/{eas-DOdj-EMK.js.map → eas-CcpQiXum.js.map} +1 -1
  82. package/dist/{errors-KM-yq2MD.js → errors-BGk_IJO5.js} +222 -275
  83. package/dist/errors-BGk_IJO5.js.map +1 -0
  84. package/dist/{getItem-Bh0zv-o1.js → getItem-CHSX3aMm.js} +5 -5
  85. package/dist/{getItem-Bh0zv-o1.js.map → getItem-CHSX3aMm.js.map} +1 -1
  86. package/dist/{getPublishPayload-oH8wJhnH.js → getPublishPayload-DMd4oLir.js} +18 -15
  87. package/dist/getPublishPayload-DMd4oLir.js.map +1 -0
  88. package/dist/{getPublishUploads-Cex-NBe6.js → getPublishUploads-C9FnRG9c.js} +9 -6
  89. package/dist/getPublishUploads-C9FnRG9c.js.map +1 -0
  90. package/dist/{index-BbFwftAv.js → index-C--KAWoe.js} +3 -2
  91. package/dist/index-C--KAWoe.js.map +1 -0
  92. package/dist/{index-DpgQMIRq.js → index-CI0NFf4B.js} +132 -9
  93. package/dist/index-CI0NFf4B.js.map +1 -0
  94. package/dist/{index-BAao3_Po.js → index-Ccmd9_KY.js} +8 -8
  95. package/dist/index-Ccmd9_KY.js.map +1 -0
  96. package/dist/index-l3b6p1Ih.js +28 -0
  97. package/dist/index-l3b6p1Ih.js.map +1 -0
  98. package/dist/{index.browser-nndbVM7z.js → index.browser-kY8M-xUA.js} +284 -73
  99. package/dist/index.browser-kY8M-xUA.js.map +1 -0
  100. package/dist/{index.node-BUfx-JaP.js → index.node-Ba2KbmOq.js} +93 -6
  101. package/dist/index.node-Ba2KbmOq.js.map +1 -0
  102. package/dist/main.js +84 -26
  103. package/dist/main.js.map +1 -1
  104. package/dist/node.js +11 -11
  105. package/dist/platform.browser.js +5 -5
  106. package/dist/platform.node.js +4 -4
  107. package/dist/{property-BDBvImLs.js → property-CO7pKTWK.js} +9 -11
  108. package/dist/property-CO7pKTWK.js.map +1 -0
  109. package/dist/{propertyValidationRules-BlfLn4rP.js → propertyValidationRules-D5HZy0Bq.js} +10 -10
  110. package/dist/{propertyValidationRules-BlfLn4rP.js.map → propertyValidationRules-D5HZy0Bq.js.map} +1 -1
  111. package/dist/{publishDraftGraph-CLO85LLz.js → publishDraftGraph-B5KPqtbg.js} +6 -6
  112. package/dist/{publishDraftGraph-CLO85LLz.js.map → publishDraftGraph-B5KPqtbg.js.map} +1 -1
  113. package/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.js → resetAmbiguousLegacyItemData-77CZ8HT7.js} +2 -2
  114. package/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.js.map → resetAmbiguousLegacyItemData-77CZ8HT7.js.map} +1 -1
  115. package/dist/{resolveModelForSyncedSeed-DFr4COc4.js → resolveModelForSyncedSeed-DHOq_FGs.js} +2 -2
  116. package/dist/{resolveModelForSyncedSeed-DFr4COc4.js.map → resolveModelForSyncedSeed-DHOq_FGs.js.map} +1 -1
  117. package/dist/seedSchema/PendingWriteSchema.ts +57 -0
  118. package/dist/seedSchema/index.ts +1 -0
  119. package/dist/src/Item/Item.d.ts +38 -7
  120. package/dist/src/Item/Item.d.ts.map +1 -1
  121. package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
  122. package/dist/src/ItemProperty/ItemProperty.d.ts +66 -9
  123. package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
  124. package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
  125. package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
  126. package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
  127. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
  128. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +1 -1
  129. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
  130. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts +5 -0
  131. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
  132. package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts +22 -0
  133. package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts.map +1 -0
  134. package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
  135. package/dist/src/Model/Model.d.ts +50 -9
  136. package/dist/src/Model/Model.d.ts.map +1 -1
  137. package/dist/src/Model/service/actors/validateModel.d.ts.map +1 -1
  138. package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
  139. package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts.map +1 -1
  140. package/dist/src/ModelProperty/service/actors/validateProperty.d.ts.map +1 -1
  141. package/dist/src/Schema/Schema.d.ts +22 -3
  142. package/dist/src/Schema/Schema.d.ts.map +1 -1
  143. package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -1
  144. package/dist/src/Schema/service/actors/createModelInstances.d.ts.map +1 -1
  145. package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
  146. package/dist/src/browser/db/Db.d.ts +7 -0
  147. package/dist/src/browser/db/Db.d.ts.map +1 -1
  148. package/dist/src/browser/db/drizzleFiles.d.ts +4 -2
  149. package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
  150. package/dist/src/browser/db/sqliteBusyRetry.d.ts.map +1 -1
  151. package/dist/src/browser/helpers/EasClient.d.ts +1 -1
  152. package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
  153. package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
  154. package/dist/src/client/ClientManager.d.ts +13 -0
  155. package/dist/src/client/ClientManager.d.ts.map +1 -1
  156. package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
  157. package/dist/src/client/addressesPersisted.d.ts +10 -0
  158. package/dist/src/client/addressesPersisted.d.ts.map +1 -0
  159. package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
  160. package/dist/src/db/Db/BaseDb.d.ts +10 -0
  161. package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
  162. package/dist/src/db/read/getItemProperties.d.ts.map +1 -1
  163. package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
  164. package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
  165. package/dist/src/db/read/getSeedData.d.ts +4 -1
  166. package/dist/src/db/read/getSeedData.d.ts.map +1 -1
  167. package/dist/src/db/read/getSeedPublisher.d.ts +4 -1
  168. package/dist/src/db/read/getSeedPublisher.d.ts.map +1 -1
  169. package/dist/src/db/read/getVersionData.d.ts +4 -1
  170. package/dist/src/db/read/getVersionData.d.ts.map +1 -1
  171. package/dist/src/db/write/claimUnpublishedDrafts.d.ts +6 -0
  172. package/dist/src/db/write/claimUnpublishedDrafts.d.ts.map +1 -1
  173. package/dist/src/db/write/createMetadata.d.ts +13 -0
  174. package/dist/src/db/write/createMetadata.d.ts.map +1 -1
  175. package/dist/src/db/write/createNewItem.d.ts +5 -0
  176. package/dist/src/db/write/createNewItem.d.ts.map +1 -1
  177. package/dist/src/db/write/createSeed.d.ts +20 -1
  178. package/dist/src/db/write/createSeed.d.ts.map +1 -1
  179. package/dist/src/db/write/createVersion.d.ts +5 -1
  180. package/dist/src/db/write/createVersion.d.ts.map +1 -1
  181. package/dist/src/db/write/removeLocalCopiesForAddresses.d.ts +9 -2
  182. package/dist/src/db/write/removeLocalCopiesForAddresses.d.ts.map +1 -1
  183. package/dist/src/db/write/updateItemPropertyValue.d.ts +9 -1
  184. package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
  185. package/dist/src/db/write/updateMetadata.d.ts +8 -1
  186. package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
  187. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  188. package/dist/src/helpers/db.d.ts +4 -2
  189. package/dist/src/helpers/db.d.ts.map +1 -1
  190. package/dist/src/helpers/entity/entityCache.d.ts +2 -42
  191. package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
  192. package/dist/src/helpers/entity/entityCommon.d.ts +9 -0
  193. package/dist/src/helpers/entity/entityCommon.d.ts.map +1 -1
  194. package/dist/src/helpers/entity/entityDestroy.d.ts +13 -7
  195. package/dist/src/helpers/entity/entityDestroy.d.ts.map +1 -1
  196. package/dist/src/helpers/entity/entityLiveQuery.d.ts +3 -2
  197. package/dist/src/helpers/entity/entityLiveQuery.d.ts.map +1 -1
  198. package/dist/src/helpers/entity/entityState.d.ts +28 -0
  199. package/dist/src/helpers/entity/entityState.d.ts.map +1 -0
  200. package/dist/src/helpers/entity/entityUnload.d.ts +3 -2
  201. package/dist/src/helpers/entity/entityUnload.d.ts.map +1 -1
  202. package/dist/src/helpers/entity/index.d.ts +1 -0
  203. package/dist/src/helpers/entity/index.d.ts.map +1 -1
  204. package/dist/src/helpers/itemStorageFile.d.ts +7 -0
  205. package/dist/src/helpers/itemStorageFile.d.ts.map +1 -1
  206. package/dist/src/helpers/metadataPropertyNames.d.ts +6 -0
  207. package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
  208. package/dist/src/helpers/property.d.ts.map +1 -1
  209. package/dist/src/helpers/propertySchemaUid.d.ts +13 -0
  210. package/dist/src/helpers/propertySchemaUid.d.ts.map +1 -0
  211. package/dist/src/helpers/propertyWriteTickets.d.ts +11 -0
  212. package/dist/src/helpers/propertyWriteTickets.d.ts.map +1 -0
  213. package/dist/src/helpers/reactiveProxy.d.ts +18 -0
  214. package/dist/src/helpers/reactiveProxy.d.ts.map +1 -1
  215. package/dist/src/helpers/sessionObjectUrls.d.ts +4 -0
  216. package/dist/src/helpers/sessionObjectUrls.d.ts.map +1 -0
  217. package/dist/src/helpers/tabCoordinator.d.ts +9 -0
  218. package/dist/src/helpers/tabCoordinator.d.ts.map +1 -1
  219. package/dist/src/helpers/tabLocks.d.ts +11 -0
  220. package/dist/src/helpers/tabLocks.d.ts.map +1 -1
  221. package/dist/src/helpers/timing.d.ts +10 -0
  222. package/dist/src/helpers/timing.d.ts.map +1 -0
  223. package/dist/src/imports/json.d.ts.map +1 -1
  224. package/dist/src/index.d.ts +1 -0
  225. package/dist/src/index.d.ts.map +1 -1
  226. package/dist/src/interfaces/IDb.d.ts +2 -0
  227. package/dist/src/interfaces/IDb.d.ts.map +1 -1
  228. package/dist/src/interfaces/IItem.d.ts +1 -0
  229. package/dist/src/interfaces/IItem.d.ts.map +1 -1
  230. package/dist/src/interfaces/IItemProperty.d.ts +5 -0
  231. package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
  232. package/dist/src/node/db/Db.d.ts +3 -0
  233. package/dist/src/node/db/Db.d.ts.map +1 -1
  234. package/dist/src/node/db/singleConnectionTransactions.d.ts +22 -0
  235. package/dist/src/node/db/singleConnectionTransactions.d.ts.map +1 -0
  236. package/dist/src/outbox/conflicts.d.ts +60 -0
  237. package/dist/src/outbox/conflicts.d.ts.map +1 -0
  238. package/dist/src/outbox/index.d.ts +9 -0
  239. package/dist/src/outbox/index.d.ts.map +1 -0
  240. package/dist/src/outbox/itemAppliers.d.ts +153 -0
  241. package/dist/src/outbox/itemAppliers.d.ts.map +1 -0
  242. package/dist/src/outbox/outbox.d.ts +143 -0
  243. package/dist/src/outbox/outbox.d.ts.map +1 -0
  244. package/dist/src/outbox/pendingValues.d.ts +27 -0
  245. package/dist/src/outbox/pendingValues.d.ts.map +1 -0
  246. package/dist/src/seedSchema/PendingWriteSchema.d.ts +385 -0
  247. package/dist/src/seedSchema/PendingWriteSchema.d.ts.map +1 -0
  248. package/dist/src/seedSchema/index.d.ts +1 -0
  249. package/dist/src/seedSchema/index.d.ts.map +1 -1
  250. package/dist/src/types/property.d.ts +5 -0
  251. package/dist/src/types/property.d.ts.map +1 -1
  252. package/dist/{syncDbWithEas-CAOlw3i-.js → syncDbWithEas-BZ6AI-IC.js} +25 -20
  253. package/dist/syncDbWithEas-BZ6AI-IC.js.map +1 -0
  254. package/dist/{tabEvents-DksXwk3X.js → tabEvents-CIlzHSKZ.js} +56 -25
  255. package/dist/tabEvents-CIlzHSKZ.js.map +1 -0
  256. package/dist/{tolerantWebAccess-CEIjFGf0.js → tolerantWebAccess-BwJ8bElF.js} +6 -6
  257. package/dist/{tolerantWebAccess-CEIjFGf0.js.map → tolerantWebAccess-BwJ8bElF.js.map} +1 -1
  258. package/dist/{updateSeedRevokedAt-Cjr35YjE.js → updateSeedRevokedAt-ClxMSXcB.js} +3 -3
  259. package/dist/{updateSeedRevokedAt-Cjr35YjE.js.map → updateSeedRevokedAt-ClxMSXcB.js.map} +1 -1
  260. package/package.json +7 -7
  261. package/dist/ClientManager-2GtDWHq6.js.map +0 -1
  262. package/dist/Item-D6j0IvBP.js.map +0 -1
  263. package/dist/ModelProperty-B52C3CQ2.js.map +0 -1
  264. package/dist/Schema-O1QLoXv6.js.map +0 -1
  265. package/dist/discardNewDraft-hiVaUVjV.js +0 -78
  266. package/dist/discardNewDraft-hiVaUVjV.js.map +0 -1
  267. package/dist/dist/ClientManager-2GtDWHq6.d.ts.map +0 -1
  268. package/dist/dist/Item-D6j0IvBP.d.ts.map +0 -1
  269. package/dist/dist/Schema-O1QLoXv6.d.ts.map +0 -1
  270. package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +0 -1
  271. package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +0 -1
  272. package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +0 -1
  273. package/dist/dist/discardNewDraft-hiVaUVjV.d.ts +0 -8
  274. package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +0 -1
  275. package/dist/dist/eas-DOdj-EMK.d.ts.map +0 -1
  276. package/dist/dist/errors-KM-yq2MD.d.ts.map +0 -1
  277. package/dist/dist/getItem-Bh0zv-o1.d.ts.map +0 -1
  278. package/dist/dist/getPublishPayload-oH8wJhnH.d.ts.map +0 -1
  279. package/dist/dist/index-BAao3_Po.d.ts.map +0 -1
  280. package/dist/dist/index-DpgQMIRq.d.ts.map +0 -1
  281. package/dist/dist/property-BDBvImLs.d.ts.map +0 -1
  282. package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +0 -1
  283. package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +0 -1
  284. package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +0 -1
  285. package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +0 -1
  286. package/dist/dist/tabEvents-DksXwk3X.d.ts.map +0 -1
  287. package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +0 -1
  288. package/dist/errors-KM-yq2MD.js.map +0 -1
  289. package/dist/getPublishPayload-oH8wJhnH.js.map +0 -1
  290. package/dist/getPublishUploads-Cex-NBe6.js.map +0 -1
  291. package/dist/index-BAao3_Po.js.map +0 -1
  292. package/dist/index-BbFwftAv.js.map +0 -1
  293. package/dist/index-DpgQMIRq.js.map +0 -1
  294. package/dist/index.browser-nndbVM7z.js.map +0 -1
  295. package/dist/index.node-BUfx-JaP.js.map +0 -1
  296. package/dist/property-BDBvImLs.js.map +0 -1
  297. package/dist/src/db/write/discardNewDraft.d.ts +0 -8
  298. package/dist/src/db/write/discardNewDraft.d.ts.map +0 -1
  299. package/dist/src/helpers/propertyWriteQueue.d.ts +0 -15
  300. package/dist/src/helpers/propertyWriteQueue.d.ts.map +0 -1
  301. package/dist/syncDbWithEas-CAOlw3i-.js.map +0 -1
  302. package/dist/tabEvents-DksXwk3X.js.map +0 -1
@@ -1,51 +1,63 @@
1
+ declare function getGetPublisherForNewSeeds(): any;
1
2
  /**
2
- * Release one reference to a cached entity instance. When none remain, remove it from the
3
- * caches, clean up its subscriptions and stop its service
3
+ * Throws OwnershipError if the item is not owned. Use before write operations
4
+ * (publish, save, destroy).
5
+ */
6
+ declare function assertItemOwned(item: any): Promise<void>;
7
+ /**
8
+ * Checks if the current user owns the item: its publisher is in the persisted owned addresses,
9
+ * or it's a local unsealed draft (no publisher, no real uid, no attestationRaw). Such a draft
10
+ * was made with no wallet connected and is editable until `claimUnpublishedDrafts`, which
11
+ * connecting a wallet calls, gives it that wallet as publisher.
4
12
  *
5
- * @param instance - Entity instance to unload
6
- * @param config - Unload configuration
13
+ * Does not include `getAdditionalSyncAddresses` (those are extra EAS indexers,
14
+ * not wallets the user controls).
7
15
  */
8
- declare function unloadEntity(instance: any, config: any): void;
9
- declare function getPublishExecutor(): any;
10
- declare function getRevokeExecutor(): any;
11
- declare var ClientManagerState: any;
16
+ declare function isItemOwned(item: any): Promise<boolean>;
12
17
  /**
13
- * Default readyTimeout for create/find/all with waitForReady. Loads that touch OPFS and the DB can take
14
- * several seconds on slow devices and CI runners; a load that is really stuck still errors.
18
+ * Wait for an entity's state machine to reach 'idle' state
19
+ * @param entity - Entity instance with getService() method
20
+ * @param options - Configuration options
21
+ * @returns Promise that resolves when entity reaches idle, or rejects on error/timeout
15
22
  */
16
- declare const DEFAULT_READY_TIMEOUT_MS: 15000;
17
- /** @deprecated See UploadExecutor. */
18
- declare function getUploadExecutor(): any;
23
+ declare function waitForEntityIdle(entity: any, options?: {}): Promise<void>;
24
+ /** Sort comparator: live before revoked; then larger time first; on tie, larger localId (lexicographic) first. */
25
+ declare function compareMetadataRowsLatestFirst(a: any, b: any): number;
19
26
  /**
20
- * Per-seed version aggregates plus the latest version row by (created_at DESC, local_id DESC) via
21
- * max(created_at) then max(local_id) tie-break.
22
- *
23
- * Revoked versions (`revoked_at` set) are never the latest version and don't count toward
24
- * `lastVersionPublishedAt`. `versionsCount` and `lastLocalUpdateAt` still cover every version row,
25
- * so a fully unpublished seed (every version revoked) keeps its row here, with null
26
- * `latestVersionUid` / `latestVersionLocalId` / `lastVersionPublishedAt`.
27
- *
28
- * For `publishedVersionUid` / `publishedVersionLocalId` on list rows, see `getItemsData`
29
- * (batched resolution aligned with `getLatestPublishedVersionRow`).
27
+ * EAS schema UID of a model's seeds: the in-memory cache, then `model_uids` (written from EAS by
28
+ * startup and sync), then EAS itself. The DB comes before EAS so creating items and saving
29
+ * images, files and Html bodies works offline. A failed EAS request (offline) counts as "no UID":
30
+ * the seed is created without one and publish looks it up again.
30
31
  */
31
- declare function getVersionData$1(): any;
32
+ declare function getEasSchemaUidForModel(modelName: any): Promise<any>;
32
33
  /**
33
- * Local draft that has never been attested: no publisher, no real uid, no attestationRaw.
34
+ * Latest version row for the seed (by createdAt) whose uid is a real EAS attestation id.
35
+ * Skips legacy 'NULL' / ZERO_BYTES32 placeholders, non-bytes32 strings, and revoked versions
36
+ * (`revoked_at` set): after a full unpublish the seed has no published version.
34
37
  */
35
- declare function isLocalUnsealedDraft(row: any): boolean;
38
+ declare function getLatestPublishedVersionRow(seedLocalId: any): Promise<{
39
+ uid: any;
40
+ localId: any;
41
+ attestationCreatedAt: any;
42
+ } | null>;
36
43
  /**
37
- * Shared ownership predicate.
38
- * - A local unsealed draft (never given a publisher) is owned whatever the owned addresses are:
39
- * it belongs to no wallet yet, and the next wallet to connect claims it (claimUnpublishedDrafts).
40
- * - Any other row is owned when its publisher (or attester) is in the owned addresses.
44
+ * Parse List property values persisted as strings (JSON array or legacy comma-separated ids).
41
45
  */
42
- declare function isSeedRowOwned(row: any, ownedAddresses: any): boolean;
46
+ declare function parseListPropertyValueFromStorage(raw: any): any;
47
+ /** Splits `values` into chunks of at most `size` (one empty list gives no chunks). */
48
+ declare function chunkValues(values: any, size?: number): any[];
43
49
  declare class Item {
44
50
  /** Prefer local id so list rows (local + uid) resolve the same cache entry as early draft loads. */
45
51
  static findItemInstanceCacheEntryByProps(props: any): any;
46
52
  static findItemInstanceCacheEntryById(id: any): any;
47
53
  static collectInstanceCacheKeysForInstance(instance: any): any[];
48
54
  static registerItemInInstanceCache(instance: any): void;
55
+ /**
56
+ * Wraps a new instance in its reactive proxy: tracked names read from and write to the actor's
57
+ * context, and the model's property names (`item.title`, or `item.html` for `htmlId`) read and
58
+ * write their ItemProperty's value.
59
+ */
60
+ static wrapInProxy(instance: any): any;
49
61
  /**
50
62
  * Sets a tracked context property from the proxy. Setting `seedUid` to a different uid means a
51
63
  * new seed attestation (publishing again after unpublish): the revocation belonged to the old
@@ -59,6 +71,11 @@ declare class Item {
59
71
  * `propertyInstances` is merged (an item with a version but no property instances yet).
60
72
  */
61
73
  static isItemSnapshotReadyForRead(snap: any): boolean;
74
+ /**
75
+ * The cached Item for a seedLocalId or seedUid, in any state, without taking a hold. For SDK code
76
+ * that reads or messages the item and doesn't hand it to a caller.
77
+ */
78
+ static peek(id: any): any;
62
79
  /**
63
80
  * The cached Item for a seedLocalId or seedUid when it can be read right now: idle and hydrated,
64
81
  * so at least what `Item.find()` would wait for. Otherwise undefined. Unlike `getById`, it takes
@@ -72,7 +89,11 @@ declare class Item {
72
89
  static waitForItemInstanceReadyForRead(item: any, readyTimeout: any): Promise<void>;
73
90
  static itemCacheEntryLooksUnhydratedAfterIdle(instance: any, props: any): boolean;
74
91
  static create(props: any, options: any): Promise<any>;
75
- /** Stops a just-created item and deletes what create wrote (see discardNewDraft). */
92
+ /**
93
+ * Stops a just-created item and deletes what create wrote: a `discard` outbox op (ADR 0019),
94
+ * applied after the item's other pending ops, hard-deletes the draft and the storage seeds its
95
+ * rows point at; their files go once it has applied.
96
+ */
76
97
  static discardCreatedItem(item: any, seedLocalId: any): Promise<void>;
77
98
  /**
78
99
  * Run each File/Image/Html/ItemStorage initial value through its ItemProperty save pipeline (sequentially, to
@@ -150,6 +171,11 @@ declare class Item {
150
171
  readonly error: {};
151
172
  };
152
173
  }, import("xstate").MetaObject>>;
174
+ /**
175
+ * The item's unresolved conflicts, one per property: local edits that were kept over a value
176
+ * sync wrote while they were pending (ADR 0019). Each property's is also on `property.conflict`.
177
+ */
178
+ conflicts: () => Promise<any[]>;
153
179
  getEditedProperties: () => Promise<any>;
154
180
  unpublish: () => Promise<void>;
155
181
  /**
@@ -193,13 +219,19 @@ declare class Item {
193
219
  };
194
220
  }, import("xstate").MetaObject>>;
195
221
  _subscription: import("xstate").Subscription;
196
- _createPropertyInstance(props: any): void;
197
222
  /**
198
- * Defines a property accessor on this Item that delegates get/set to the
199
- * ItemProperty in context.propertyInstances at access time (so the correct
200
- * instance is used after loadOrCreateItemSuccess merges DB-backed instances).
223
+ * The ItemProperty a model property name reads and writes on the item: by its name, or by its
224
+ * storage name (`html` finds `htmlId` and the other way round). Internal names don't resolve.
225
+ */
226
+ _findPropertyInstance(propertyName: any): any;
227
+ /** Every name `_findPropertyInstance` resolves: the stored names and their schema names. */
228
+ _propertyInstanceNames(): any[];
229
+ /**
230
+ * Writes an assigned seed uid to the item's seed row, so later loads and getPublishPayload see it.
231
+ * Writes run one after another per item, so the last assignment is the one that stays.
201
232
  */
202
- _definePropertyAccessor(propertyName: any): void;
233
+ _persistSeedUid(seedUid: any): void;
234
+ _createPropertyInstance(props: any): void;
203
235
  get serviceContext(): {};
204
236
  /**
205
237
  * Get snapshot context from the service
@@ -279,21 +311,17 @@ declare namespace Item {
279
311
  let instanceCache: Map<any, any>;
280
312
  let CREATE_METADATA_KEYS: Set<string>;
281
313
  }
282
- /** SQL form of {@link isLocalUnsealedDraft} on `seeds`. */
283
- declare function localUnsealedDraftSql(): import("drizzle-orm").SQL<unknown> | undefined;
284
314
  /**
285
- * @deprecated Matches `seeds.publisher` only. Use {@link ownedSeedsSql}, which agrees
286
- * with {@link isSeedRowOwned} (empty owned → local unsealed drafts; attester fallback).
315
+ * Rows per multi-row INSERT into `table` so the statement binds at most
316
+ * {@link SQLITE_DEFAULT_MAX_VARIABLE_NUMBER} parameters even with every column set.
287
317
  */
288
- declare function ownedPublisherSql(ownedAddresses: any): import("drizzle-orm").SQL<any>;
318
+ declare function rowsPerInsert(table: any): number;
319
+ declare function getGetAdditionalSyncAddresses(): any;
289
320
  /**
290
- * SQL for `addressFilter: 'owned'`: a row passes exactly when {@link isSeedRowOwned} is true.
291
- * - Local unsealed drafts always pass.
292
- * - Otherwise `lower(trim(publisher))` is in the owned set, or, when publisher is blank, the
293
- * `attestationRaw.attester` ({@link resolvePublisherFromSeedRow}). `json_valid` guards
294
- * `json_extract`, which throws on malformed JSON.
321
+ * Runs `query` once per chunk of `values` (see {@link chunkValues}), one after another, and
322
+ * concatenates the rows. Use it for `inArray(column, values)` reads whose list can be large.
295
323
  */
296
- declare function ownedSeedsSql(ownedAddresses: any): import("drizzle-orm").SQL<unknown> | undefined;
324
+ declare function selectInBatches(values: any, query: any, size?: number): Promise<any[]>;
297
325
  /**
298
326
  * Canonical "latest metadata row first" ordering, the one readers use to pick a property's value
299
327
  * from its rows across versions:
@@ -310,16 +338,161 @@ declare function ownedSeedsSql(ownedAddresses: any): import("drizzle-orm").SQL<u
310
338
  * out; keep those in sync.
311
339
  */
312
340
  declare const METADATA_LATEST_FIRST_ORDER_SQL: "(revoked_at IS NOT NULL), COALESCE(attestation_created_at, created_at) DESC, local_id DESC";
313
- /** The row readers show for each property name (first by {@link compareMetadataRowsLatestFirst}). */
314
- declare function pickLatestMetadataRowPerProperty(rows: any): any[];
315
341
  /**
316
- * Thrown by write operations (save, destroy, publish, unpublish) on an item none
317
- * of the client's addresses own. See isItemOwned for what counts as owned.
342
+ * True when a version row's attestation was revoked (`versions.revoked_at` set). 0 counts as
343
+ * "not revoked", like `seeds.revoked_at`.
318
344
  */
319
- declare class OwnershipError extends Error {
320
- constructor(message?: string);
321
- }
345
+ declare function isVersionRevoked(revokedAt: any): boolean;
346
+ /** How long a deferred op waits before the drainer tries it again. */
347
+ declare const OUTBOX_DEFER_MS: 50;
348
+ /**
349
+ * Whether an actor has been stopped (unload, destroy, or Schema eviction). Async work started by an
350
+ * entity (DB lookups, retry timers) must check this before sending, since a stopped actor ignores
351
+ * events and XState warns about every one of them.
352
+ */
353
+ declare function isActorStopped(actor: any): boolean;
354
+ /**
355
+ * Default readyTimeout for create/find/all with waitForReady. Loads that touch OPFS and the DB can take
356
+ * several seconds on slow devices and CI runners; a load that is really stuck still errors.
357
+ */
358
+ declare const DEFAULT_READY_TIMEOUT_MS: 15000;
359
+ /**
360
+ * Creates a reactive Proxy that intercepts property access and assignment
361
+ * to read from and write to an actor service's context.
362
+ *
363
+ * This enables automatic React re-renders when properties change, as the
364
+ * React hooks subscribe to the actor service which gets updated when properties
365
+ * are set via the proxy.
366
+ *
367
+ * @param config Configuration object
368
+ * @returns A proxied instance that behaves like the original but with reactive properties
369
+ *
370
+ * @note TypeScript's Proxy type doesn't automatically preserve method signatures,
371
+ * so we use Proxied<T> to ensure all methods and properties are recognized.
372
+ * The Proxy implementation preserves all methods via Reflect.get, so this is safe.
373
+ */
374
+ declare function createReactiveProxy(config: any): any;
375
+ /**
376
+ * Common getters and utilities for entity classes
377
+ * These work with any entity that has a getService() method returning an XState actor
378
+ */
379
+ /**
380
+ * Get the current state value from an entity's service
381
+ */
382
+ /**
383
+ * Whether two references are the same entity: an instance and its reactive proxy are different
384
+ * objects that share one actor.
385
+ */
386
+ declare function sameEntity(a: any, b: any): boolean;
387
+ /**
388
+ * Generic find implementation for entities
389
+ *
390
+ * @param config - Find configuration with lookup methods
391
+ * @param params - Find parameters (id, name, or other entity-specific params)
392
+ * @param options - Find options (waitForReady, readyTimeout)
393
+ * @returns Entity instance if found, undefined otherwise
394
+ */
395
+ declare function findEntity(config: any, params: any, options?: {}): Promise<any>;
396
+ /**
397
+ * Remove the instance from all given caches by key, without refCount (always delete).
398
+ * Works for both entry caches and index caches since the operation is only delete(key).
399
+ */
400
+ declare function forceRemoveFromCaches(instance: any, config: any): void;
401
+ /**
402
+ * Run the service event sequence and stop the service:
403
+ * destroyStarted -> doDestroy -> (destroyError on failure) -> stop.
404
+ * A doDestroy failure is recorded on the service (destroyError) and rethrown, so destroy()
405
+ * rejects instead of resolving with the rows still in the DB.
406
+ * Event names must match what the entity machines expect.
407
+ */
408
+ declare function runDestroyLifecycle(instance: any, config: any): Promise<void>;
409
+ /**
410
+ * A metadata row holds published content when it has a valid EAS attestation uid, or when sync
411
+ * derived it from one (ItemStorage rows from a storage_transaction_id attestation: no uid of their
412
+ * own, `derivedFromUid` set). Anything else is a local edit (or a row awaiting its uid backfill).
413
+ */
414
+ declare function isPublishedMetadataRow(row: any): boolean;
415
+ declare var ClientManagerState: any;
416
+ declare var MachineIds: any;
322
417
  declare const PUBLISH_NOT_CONFIGURED_MESSAGE: "Publishing is not configured. item.publish() needs @seedprotocol/publish: call initPublish() from it, or mount <PublishProvider config={...}>, before publishing.";
418
+ /**
419
+ * Writes a new item (ADR 0019): its seed, first version and a row per property go in one outbox op
420
+ * applied in one transaction, so a failure leaves nothing behind. ItemStorage initial values are
421
+ * staged first and moved into the item's files when the op applies.
422
+ */
423
+ declare function createNewItem({ modelName, modelFileId, ...propertyData }: {
424
+ [x: string]: any;
425
+ modelName: any;
426
+ modelFileId: any;
427
+ }): Promise<{
428
+ modelName: any;
429
+ seedLocalId: string;
430
+ versionLocalId: any;
431
+ }>;
432
+ /**
433
+ * Appends one op and waits until it settles: its applier's result once applied, or `superseded`
434
+ * when a newer op of its property replaced it. Rejects with OutboxOpFailedError when it fails.
435
+ */
436
+ declare function appendOutboxOpAndWait(input: any): Promise<{
437
+ superseded: boolean;
438
+ result?: undefined;
439
+ } | {
440
+ superseded: boolean;
441
+ result: any;
442
+ }>;
443
+ /**
444
+ * Metadata rows of a seed numbered per property_name in reader order (`rowNum = 1` is the value to
445
+ * show): live rows before revoked ones, then newest first. See `compareMetadataRowsLatestFirst`.
446
+ */
447
+ declare function getMetadataLatest({ seedLocalId, seedUid }: {
448
+ seedLocalId: any;
449
+ seedUid: any;
450
+ }): any;
451
+ declare function getPublishExecutor(): any;
452
+ declare function getRevokeExecutor(): any;
453
+ /** @deprecated See UploadExecutor. */
454
+ declare function getUploadExecutor(): any;
455
+ /**
456
+ * Per-seed version aggregates plus the latest version row by (created_at DESC, local_id DESC) via
457
+ * max(created_at) then max(local_id) tie-break.
458
+ *
459
+ * Revoked versions (`revoked_at` set) are never the latest version and don't count toward
460
+ * `lastVersionPublishedAt`. `versionsCount` and `lastLocalUpdateAt` still cover every version row,
461
+ * so a fully unpublished seed (every version revoked) keeps its row here, with null
462
+ * `latestVersionUid` / `latestVersionLocalId` / `lastVersionPublishedAt`.
463
+ *
464
+ * For `publishedVersionUid` / `publishedVersionLocalId` on list rows, see `getItemsData`
465
+ * (batched resolution aligned with `getLatestPublishedVersionRow`).
466
+ */
467
+ declare function getVersionData$1(): any;
468
+ /**
469
+ * Local draft that has never been attested: no publisher, no real uid, no attestationRaw.
470
+ */
471
+ declare function isLocalUnsealedDraft(row: any): boolean;
472
+ /**
473
+ * Shared ownership predicate.
474
+ * - A local unsealed draft (never given a publisher) is owned whatever the owned addresses are:
475
+ * it belongs to no wallet yet, and the next wallet to connect claims it (claimUnpublishedDrafts).
476
+ * - Any other row is owned when its publisher (or attester) is in the owned addresses.
477
+ */
478
+ declare function isSeedRowOwned(row: any, ownedAddresses: any): boolean;
479
+ /** SQL form of {@link isLocalUnsealedDraft} on `seeds`. */
480
+ declare function localUnsealedDraftSql(): import("drizzle-orm").SQL<unknown> | undefined;
481
+ /**
482
+ * @deprecated Matches `seeds.publisher` only. Use {@link ownedSeedsSql}, which agrees
483
+ * with {@link isSeedRowOwned} (empty owned → local unsealed drafts; attester fallback).
484
+ */
485
+ declare function ownedPublisherSql(ownedAddresses: any): import("drizzle-orm").SQL<any>;
486
+ /**
487
+ * SQL for `addressFilter: 'owned'`: a row passes exactly when {@link isSeedRowOwned} is true.
488
+ * - Local unsealed drafts always pass.
489
+ * - Otherwise `lower(trim(publisher))` is in the owned set, or, when publisher is blank, the
490
+ * `attestationRaw.attester` ({@link resolvePublisherFromSeedRow}). `json_valid` guards
491
+ * `json_extract`, which throws on malformed JSON.
492
+ */
493
+ declare function ownedSeedsSql(ownedAddresses: any): import("drizzle-orm").SQL<unknown> | undefined;
494
+ /** The row readers show for each property name (first by {@link compareMetadataRowsLatestFirst}). */
495
+ declare function pickLatestMetadataRowPerProperty(rows: any): any[];
323
496
  /** SQL form of {@link isPlaceholderUid}: null, `''`, `'NULL'`, or zero bytes32 (trimmed, any case). */
324
497
  declare function placeholderUidSql(column: any): import("drizzle-orm").SQL<unknown> | undefined;
325
498
  declare const propertyMachine: import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
@@ -406,27 +579,188 @@ declare function setRevokeExecutor(executor: any): void;
406
579
  /** @deprecated See UploadExecutor. */
407
580
  declare function setUploadExecutor(executor: any): void;
408
581
  /**
409
- * Proxy [[GetOwnProperty]] that stays compatible with the target.
410
- * Never overrides an own descriptor, never invents on a non-extensible target,
411
- * and never promotes a prototype accessor to an own descriptor.
582
+ * Per-instance state for an entity (liveQuery subscriptions and the like), keyed by the entity's
583
+ * actor. An entity's raw instance and its reactive proxy are different objects that share one
584
+ * actor. State set from the constructor (`this` = raw instance) must be found again from methods
585
+ * called on the proxy (`this` = proxy), so a WeakMap keyed by the instance misses there.
586
+ *
587
+ * `getService()` must return the actor before the first `set`.
412
588
  */
413
- declare function getInvariantSafePropertyDescriptor(target: any, prop: any, invent: any): TypedPropertyDescriptor<any> | {
414
- enumerable: boolean;
415
- configurable: boolean;
416
- value: any;
417
- writable: any;
418
- } | undefined;
589
+ declare class ActorKeyedState {
590
+ states: WeakMap<object, any>;
591
+ get(instance: any): any;
592
+ set(instance: any, state: any): this;
593
+ delete(instance: any): boolean;
594
+ has(instance: any): boolean;
595
+ }
419
596
  /**
420
597
  * Shared helpers for entity destroy operations.
421
598
  * Used by Schema, Model, ModelProperty, Item, and ItemProperty destroy() methods.
422
599
  */
423
600
  /**
424
- * Unsubscribe liveQuery and any extra subscription (e.g. Item/ItemProperty _subscription).
425
- * Swallows errors so one failure doesn't block the rest.
601
+ * Unsubscribe the entity's liveQueries and any extra subscription (e.g. Item/ItemProperty
602
+ * _subscription), and drop its instance state. Swallows errors so one failure doesn't block the rest.
426
603
  */
427
604
  declare function clearDestroySubscriptions(instance: any, config: any): void;
605
+ /**
606
+ * Release one reference to a cached entity instance. When none remain, remove it from the
607
+ * caches, clean up its subscriptions and stop its service
608
+ *
609
+ * @param instance - Entity instance to unload
610
+ * @param config - Unload configuration
611
+ */
612
+ declare function unloadEntity(instance: any, config: any): void;
613
+ declare var ClientManagerEvents: any;
614
+ /** Resolve publisher from seed row: `publisher` column, else `attestationRaw.attester`. */
615
+ declare function resolvePublisherFromSeedRow(row: any): any;
616
+ /**
617
+ * The publisher a seed's version and property rows take: the seed's own (its `publisher`, else the
618
+ * attester of its stored attestation). Undefined for a draft that belongs to no wallet yet; those
619
+ * rows are then claimed together with their seed (claimUnpublishedDrafts).
620
+ */
621
+ declare function getSeedPublisher(seedLocalId: any, db?: any): Promise<any>;
622
+ /** Html, Image, File and Relation rows are stored as `<name>Id`; match either spelling. */
623
+ declare function propertyNameVariants(name: any): any[];
624
+ declare function createSeed({ type, seedUid, modelFileId }: {
625
+ type: any;
626
+ seedUid: any;
627
+ modelFileId: any;
628
+ }, options?: {}): Promise<any>;
629
+ declare function createMetadata(metadataValues: any, propertyRecordSchema: any, options: any): Promise<any>;
630
+ declare function updateItemPropertyValue({ localId: localIdParam, propertyName, newValue, seedUid, seedLocalId, modelName, refSeedType, refResolvedValue, refResolvedDisplayValue, versionLocalId, versionUid, schemaUid, localStorageDir, dataType, refValueType, }: {
631
+ localId: any;
632
+ propertyName: any;
633
+ newValue: any;
634
+ seedUid: any;
635
+ seedLocalId: any;
636
+ modelName: any;
637
+ refSeedType: any;
638
+ refResolvedValue: any;
639
+ refResolvedDisplayValue: any;
640
+ versionLocalId: any;
641
+ versionUid: any;
642
+ schemaUid: any;
643
+ localStorageDir: any;
644
+ dataType: any;
645
+ refValueType: any;
646
+ }, options?: {}): Promise<{
647
+ localId: any;
648
+ uid: any;
649
+ schemaUid: any;
650
+ } | undefined>;
651
+ declare var getPropertyData$1: Readonly<{
652
+ __proto__: null;
653
+ getPropertyData: ({ propertyName, seedLocalId, seedUid, modelName, }: {
654
+ propertyName: any;
655
+ seedLocalId: any;
656
+ seedUid: any;
657
+ modelName: any;
658
+ }) => Promise<any>;
659
+ }>;
660
+ declare var Item$1: Readonly<{
661
+ __proto__: null;
662
+ Item: typeof Item;
663
+ }>;
664
+ /**
665
+ * Resolves once the op is applied, or superseded by a newer op that applied; rejects with
666
+ * OutboxOpFailedError when it, or the op that superseded it, failed.
667
+ */
668
+ declare function waitForOutboxOp(opId: any): Promise<any>;
669
+ /** Appends one op; see appendOutboxOps. */
670
+ declare function appendOutboxOp(input: any): Promise<any>;
671
+ /** Attempts before a retryable error fails the op. */
672
+ declare const OUTBOX_MAX_ATTEMPTS: 8;
673
+ /** Applied and superseded ops are kept this long, then pruned. */
674
+ declare const OUTBOX_PRUNE_AFTER_MS: number;
675
+ /** Failed ops are kept longer, so a refused write can still be looked into. */
676
+ declare const OUTBOX_PRUNE_FAILED_AFTER_MS: number;
677
+ /** The status of each op, by id; ops not found are left out. */
678
+ declare function getOutboxOps(opIds: any): Promise<any>;
679
+ /** Waits before each retry of an op that failed with a retryable error; the last is reused. */
680
+ declare const OUTBOX_RETRY_DELAYS_MS: number[];
681
+ /**
682
+ * An op that can't apply yet for a reason that will pass without counting as a failure: an applier's
683
+ * `around` found a lock held. The drainer sets the op (and its property's queue) aside for
684
+ * OUTBOX_DEFER_MS and goes on with other ops; its attempts aren't counted.
685
+ */
686
+ declare class OutboxOpDeferredError extends Error {
687
+ constructor(message: any);
688
+ }
689
+ /** Rejects `waitForOutboxOp` for an op that failed, or that a failed op superseded. */
690
+ declare class OutboxOpFailedError extends Error {
691
+ constructor(opId: any, message: any, errorName?: null);
692
+ opId: any;
693
+ errorName: any;
694
+ code: string;
695
+ }
696
+ /** An op that can never apply (a broken rule, an item the client doesn't own). Not retried. */
697
+ declare class OutboxOpRejectedError extends Error {
698
+ constructor(message: any, options: any);
699
+ }
700
+ /** A failure worth retrying (a file the browser had locked, say). Other errors fail the op at once. */
701
+ declare class OutboxOpRetryableError extends Error {
702
+ constructor(message: any, options: any);
703
+ }
704
+ /**
705
+ * Appends one op, or several that apply together (they share a new group id unless they carry
706
+ * one), and tells the leader to drain. Returns the op ids in order.
707
+ */
708
+ declare function appendOutboxOps(inputs: any): Promise<any>;
709
+ /**
710
+ * Applies every pending op that is due, in order. Exported for tests and for code that must see
711
+ * the outbox applied before it continues; normally the leader drains on its own.
712
+ */
713
+ declare function drainOutbox(): Promise<void>;
714
+ /** What an applied op's applier returned, decoded. */
715
+ declare function outboxOpResult(op: any): any;
716
+ /**
717
+ * The value an item property will have once its pending `set` ops apply, in its stored string form.
718
+ * Undefined when its newest pending value op is not a `set`, or it has none.
719
+ */
720
+ declare function getPendingSetValue(seedLocalId: any, propertyName: any): Promise<any>;
721
+ /** An op's stored value, decoded. */
722
+ declare function outboxOpValue(op: any): any;
723
+ /**
724
+ * Deletes settled ops older than their retention: applied and superseded ops after
725
+ * OUTBOX_PRUNE_AFTER_MS, failed ones after OUTBOX_PRUNE_FAILED_AFTER_MS. An applied op with an
726
+ * unresolved conflict stays until the conflict is resolved. Pending ops are never pruned. The
727
+ * leader runs it after a drain, at most hourly. Returns how many ops it deleted.
728
+ */
729
+ declare function pruneOutbox(now?: number): Promise<any>;
730
+ /** Registers the applier for one op kind; returns a function that removes it. */
731
+ declare function registerOutboxApplier(kind: any, applier: any): () => void;
732
+ /**
733
+ * Starts draining in this tab once it is the leader, resuming ops left pending (a reload, a closed
734
+ * leader tab), and listens for other tabs' nudges and settled ops. Safe to call more than once.
735
+ */
736
+ declare function startOutbox(): void;
737
+ /** Runs `write` once per chunk of `values`, one after another (deletes / updates with an `IN` list). */
738
+ declare function writeInBatches(values: any, write: any, size?: number): Promise<void>;
739
+ /**
740
+ * Assemble flat ItemData for Item / liveQuery / draft-head authoring.
741
+ *
742
+ * For **published chain JSON** (Seed → latest attested Version → properties),
743
+ * prefer `getPublishedSeedRecord` from `@seedprotocol/sdk` or
744
+ * `getSeed` / `queryBySchema` from `@seedprotocol/query`. This function remains
745
+ * the correct path for local-head / draft-wins property selection used by Item.
746
+ */
747
+ declare function getItemData({ modelName, seedLocalId, seedUid, }: {
748
+ modelName: any;
749
+ seedLocalId: any;
750
+ seedUid: any;
751
+ }): Promise<any>;
752
+ /**
753
+ * Resolves once every op pending when it was called has settled (applied, superseded or failed),
754
+ * so a reader of `metadata` sees every edit made before. Publish waits on this before it reads.
755
+ */
756
+ declare function waitForPendingOutboxOps(): Promise<void>;
428
757
  declare class ItemProperty {
429
758
  static create(props: any, options: any): any;
759
+ /**
760
+ * Wraps a new instance in its reactive proxy: tracked names read from and write to the actor's
761
+ * context, and assigning `value` also sends it to the actor before the setter runs.
762
+ */
763
+ static wrapInProxy(instance: any): any;
430
764
  /**
431
765
  * The cached ItemProperty when it can be read right now (idle, not saving), the state
432
766
  * `ItemProperty.find()` waits for. Otherwise undefined. Unlike `find`, it takes no cache hold, so
@@ -437,21 +771,39 @@ declare class ItemProperty {
437
771
  seedLocalId: any;
438
772
  seedUid: any;
439
773
  }): any;
440
- static find({ propertyName, seedLocalId, seedUid, modelName: modelNameOption, waitForReady, readyTimeout, }: {
774
+ /** Takes a hold on the instance it returns: release it with `unload()`. */
775
+ static find({ propertyName, seedLocalId, seedUid, modelName: modelNameOption, waitForReady, readyTimeout, hold, }: {
441
776
  propertyName: any;
442
777
  seedLocalId: any;
443
778
  seedUid: any;
444
779
  modelName: any;
445
780
  waitForReady?: boolean | undefined;
446
781
  readyTimeout?: number | undefined;
782
+ hold: any;
447
783
  }): Promise<any>;
448
784
  /**
449
785
  * Get all ItemProperty instances for an item.
450
786
  * Loads property data via getItemProperties, creates instances via create, optionally waits for idle.
787
+ * Takes a hold on each instance, as `create` does.
451
788
  */
452
789
  static all(params: any, options: any): Promise<any[]>;
790
+ /**
791
+ * @internal Takes one more hold on a cached, running instance, released with `unload()`. False
792
+ * (and no hold) when the instance isn't cached or was stopped.
793
+ */
794
+ static retain(instance: any): boolean;
795
+ /**
796
+ * Stops an item's cached properties that nobody holds. Internal lookups cache a property without
797
+ * a hold for the item to take; one that finished after the item stopped (a liveQuery handler's
798
+ * find, say) never got that hold and would otherwise keep running. Called when the item stops.
799
+ */
800
+ static unloadUnheldForItem(seedIds: any): void;
453
801
  static cacheKey(seedLocalIdOrUid: any, propertyName: any): string;
454
- /** Clears instance cache for an item (for test isolation when run in group). */
802
+ /**
803
+ * Drops an item's properties from the instance cache, under every key they're cached by. A dropped
804
+ * instance someone still holds keeps running but is detached: it doesn't re-key itself into the
805
+ * cache when its context changes, so the next lookup creates a fresh instance.
806
+ */
455
807
  static clearInstanceCacheForItem(seedLocalIdOrUid: any): void;
456
808
  constructor(initialValues: any);
457
809
  _isRelation: boolean;
@@ -659,21 +1011,46 @@ declare class ItemProperty {
659
1011
  /** Validation errors from last failed save (enum, pattern, minLength, maxLength). Cleared when the next save starts. */
660
1012
  get saveValidationErrors(): any;
661
1013
  get alias(): any;
1014
+ /**
1015
+ * The unresolved conflict between this property's last local edit and a value sync wrote while
1016
+ * the edit was pending (ADR 0019): the local edit was kept, and `remoteValue` is what sync wrote.
1017
+ * Null when there is none. Cleared by the next edit or `resolveConflict`.
1018
+ */
1019
+ get conflict(): any;
1020
+ /**
1021
+ * Settles `conflict`. `'local'` keeps the local edit. `'remote'` drops the local draft, so the
1022
+ * synced value shows again (and publish has nothing to send for this property).
1023
+ */
1024
+ resolveConflict(choice: any): Promise<void>;
662
1025
  set value(value: any);
663
1026
  get value(): any;
664
1027
  /**
665
1028
  * Shows `value` at once and saves it; `await property.save()` to wait for the result. Unlike
666
1029
  * assigning `property.value`, it saves even when `value` is already in context.
667
1030
  *
668
- * @param options.before - The values to restore if the save is refused or fails. Defaults to the
669
- * current context; pass it when you already put `value` into context (a debounced input, say),
670
- * so a refusal still rolls back to what was there before.
1031
+ * @param options.before - The values to restore if the save is refused or fails. Defaults to what
1032
+ * showed before the first `showValue` since the last save, else the current context.
671
1033
  */
672
1034
  setValue(value: any, options?: {}): void;
1035
+ _unsavedBefore: {
1036
+ propertyValue: any;
1037
+ renderValue: any;
1038
+ } | undefined;
673
1039
  _pendingSchemaSave: Promise<boolean> | undefined;
1040
+ /**
1041
+ * Shows `value` without saving it, for input that saves later (a debounced text field). The next
1042
+ * `setValue` or assignment saves, and if that save is refused or fails, the property goes back to
1043
+ * what showed before the first `showValue`.
1044
+ */
1045
+ showValue(value: any): void;
674
1046
  get published(): boolean;
675
1047
  subscribe(callback: any): import("xstate").Subscription;
676
1048
  save(): Promise<void>;
1049
+ /**
1050
+ * Every cache key holding this instance: its item's local id and seed uid, and the name it had
1051
+ * before a rename (List of relation). They share one entry.
1052
+ */
1053
+ _cacheKeys(): any[];
677
1054
  unload(): void;
678
1055
  /**
679
1056
  * Destroy the item property: remove from caches, delete its metadata rows (every version of
@@ -681,211 +1058,24 @@ declare class ItemProperty {
681
1058
  * Throws OwnershipError if none of the client's addresses own the item.
682
1059
  */
683
1060
  destroy(): Promise<void>;
1061
+ _destroyRows(context: any): Promise<void>;
684
1062
  }
685
1063
  declare namespace ItemProperty {
686
1064
  let instanceCache_1: Map<any, any>;
687
1065
  export { instanceCache_1 as instanceCache };
688
1066
  }
689
- declare var ClientManagerEvents: any;
690
- /**
691
- * Runs `fn` with a fresh read of metadata row `localId`, holding the lock of the file that row's
692
- * content goes to. `fileOf` names that file (absolute path) for a row, or returns undefined when
693
- * there is nothing to write (then `fn` isn't called and the result is undefined).
694
- *
695
- * The file depends on the row, so the row is read once to pick the lock and again once it is held;
696
- * if the row now points at another file (another writer changed it meanwhile), the lock is
697
- * released and taken again for that file.
698
- */
699
- declare function withLockedItemStorageRow(localId: any, fileOf: any, fn: any): Promise<any>;
700
- /** Absolute path of the file {@link writeItemStorageFile} writes for `target`. */
701
- declare function getItemStorageFilePath(target: any): string;
702
- /**
703
- * Write an ItemStorage property's content to its local file, where saveItemStorage, reads, publish
704
- * (resolveItemStorageChildFile) and download all look for it. Returns what the metadata row records:
705
- * `refResolvedValue` (the file name) and `localStorageDir` (with a leading slash).
706
- *
707
- * Callers that also update the file's metadata row hold {@link withItemStorageFileLock} around
708
- * both, so another writer of the same file can't land in between.
709
- */
710
- declare function writeItemStorageFile(target: any, content: any): Promise<{
711
- fileName: any;
712
- filePath: string;
713
- localStorageDir: any;
714
- }>;
715
- /** Resolve publisher from seed row: `publisher` column, else `attestationRaw.attester`. */
716
- declare function resolvePublisherFromSeedRow(row: any): any;
717
- declare var getPropertyData$1: Readonly<{
718
- __proto__: null;
719
- getPropertyData: ({ propertyName, seedLocalId, seedUid, modelName, }: {
720
- propertyName: any;
721
- seedLocalId: any;
722
- seedUid: any;
723
- modelName: any;
724
- }) => Promise<any>;
725
- }>;
726
- declare var Item$1: Readonly<{
727
- __proto__: null;
728
- Item: typeof Item;
729
- }>;
730
1067
  /** Thrown by ItemProperty.save() when the value failed validation (enum, pattern, minLength, maxLength). */
731
1068
  declare class ItemPropertySaveValidationError extends Error {
732
1069
  constructor(message: any, validationErrors: any);
733
1070
  validationErrors: any;
734
1071
  }
735
1072
  /**
736
- * Throws OwnershipError if the item is not owned. Use before write operations
737
- * (publish, save, destroy).
738
- */
739
- declare function assertItemOwned(item: any): Promise<void>;
740
- /**
741
- * Wait for an entity's state machine to reach 'idle' state
742
- * @param entity - Entity instance with getService() method
743
- * @param options - Configuration options
744
- * @returns Promise that resolves when entity reaches idle, or rejects on error/timeout
745
- */
746
- declare function waitForEntityIdle(entity: any, options?: {}): Promise<void>;
747
- /** Sort comparator: live before revoked; then larger time first; on tie, larger localId (lexicographic) first. */
748
- declare function compareMetadataRowsLatestFirst(a: any, b: any): number;
749
- /**
750
- * EAS schema UID of a model's seeds: the in-memory cache, then `model_uids` (written from EAS by
751
- * startup and sync), then EAS itself. The DB comes before EAS so creating items and saving
752
- * images, files and Html bodies works offline. A failed EAS request (offline) counts as "no UID":
753
- * the seed is created without one and publish looks it up again.
754
- */
755
- declare function getEasSchemaUidForModel(modelName: any): Promise<any>;
756
- /**
757
- * Assemble flat ItemData for Item / liveQuery / draft-head authoring.
758
- *
759
- * For **published chain JSON** (Seed → latest attested Version → properties),
760
- * prefer `getPublishedSeedRecord` from `@seedprotocol/sdk` or
761
- * `getSeed` / `queryBySchema` from `@seedprotocol/query`. This function remains
762
- * the correct path for local-head / draft-wins property selection used by Item.
763
- */
764
- declare function getItemData({ modelName, seedLocalId, seedUid, }: {
765
- modelName: any;
766
- seedLocalId: any;
767
- seedUid: any;
768
- }): Promise<any>;
769
- /**
770
- * Latest version row for the seed (by createdAt) whose uid is a real EAS attestation id.
771
- * Skips legacy 'NULL' / ZERO_BYTES32 placeholders, non-bytes32 strings, and revoked versions
772
- * (`revoked_at` set): after a full unpublish the seed has no published version.
773
- */
774
- declare function getLatestPublishedVersionRow(seedLocalId: any): Promise<{
775
- uid: any;
776
- localId: any;
777
- attestationCreatedAt: any;
778
- } | null>;
779
- /**
780
- * Checks if the current user owns the item: its publisher is in the persisted owned addresses,
781
- * or it's a local unsealed draft (no publisher, no real uid, no attestationRaw). Such a draft
782
- * was made with no wallet connected and is editable until `claimUnpublishedDrafts`, which
783
- * connecting a wallet calls, gives it that wallet as publisher.
784
- *
785
- * Does not include `getAdditionalSyncAddresses` (those are extra EAS indexers,
786
- * not wallets the user controls).
787
- */
788
- declare function isItemOwned(item: any): Promise<boolean>;
789
- /** Splits `values` into chunks of at most `size` (one empty list gives no chunks). */
790
- declare function chunkValues(values: any, size?: number): any[];
791
- declare function getGetAdditionalSyncAddresses(): any;
792
- /**
793
- * True when a version row's attestation was revoked (`versions.revoked_at` set). 0 counts as
794
- * "not revoked", like `seeds.revoked_at`.
795
- */
796
- declare function isVersionRevoked(revokedAt: any): boolean;
797
- /**
798
- * Creates a reactive Proxy that intercepts property access and assignment
799
- * to read from and write to an actor service's context.
800
- *
801
- * This enables automatic React re-renders when properties change, as the
802
- * React hooks subscribe to the actor service which gets updated when properties
803
- * are set via the proxy.
804
- *
805
- * @param config Configuration object
806
- * @returns A proxied instance that behaves like the original but with reactive properties
807
- *
808
- * @note TypeScript's Proxy type doesn't automatically preserve method signatures,
809
- * so we use Proxied<T> to ensure all methods and properties are recognized.
810
- * The Proxy implementation preserves all methods via Reflect.get, so this is safe.
811
- */
812
- declare function createReactiveProxy(config: any): any;
813
- /**
814
- * Generic find implementation for entities
815
- *
816
- * @param config - Find configuration with lookup methods
817
- * @param params - Find parameters (id, name, or other entity-specific params)
818
- * @param options - Find options (waitForReady, readyTimeout)
819
- * @returns Entity instance if found, undefined otherwise
820
- */
821
- declare function findEntity(config: any, params: any, options?: {}): Promise<any>;
822
- /**
823
- * Remove the instance from all given caches by key, without refCount (always delete).
824
- * Works for both entry caches and index caches since the operation is only delete(key).
825
- */
826
- declare function forceRemoveFromCaches(instance: any, config: any): void;
827
- /**
828
- * Parse List property values persisted as strings (JSON array or legacy comma-separated ids).
829
- */
830
- declare function parseListPropertyValueFromStorage(raw: any): any;
831
- /**
832
- * Run the service event sequence and stop the service:
833
- * destroyStarted -> doDestroy -> (destroyError on failure) -> stop.
834
- * A doDestroy failure is recorded on the service (destroyError) and rethrown, so destroy()
835
- * rejects instead of resolving with the rows still in the DB.
836
- * Event names must match what the entity machines expect.
837
- */
838
- declare function runDestroyLifecycle(instance: any, config: any): Promise<void>;
839
- /**
840
- * Rows per multi-row INSERT into `table` so the statement binds at most
841
- * {@link SQLITE_DEFAULT_MAX_VARIABLE_NUMBER} parameters even with every column set.
842
- */
843
- declare function rowsPerInsert(table: any): number;
844
- /**
845
- * Runs `query` once per chunk of `values` (see {@link chunkValues}), one after another, and
846
- * concatenates the rows. Use it for `inArray(column, values)` reads whose list can be large.
847
- */
848
- declare function selectInBatches(values: any, query: any, size?: number): Promise<any[]>;
849
- /**
850
- * A metadata row holds published content when it has a valid EAS attestation uid, or when sync
851
- * derived it from one (ItemStorage rows from a storage_transaction_id attestation: no uid of their
852
- * own, `derivedFromUid` set). Anything else is a local edit (or a row awaiting its uid backfill).
853
- */
854
- declare function isPublishedMetadataRow(row: any): boolean;
855
- declare var MachineIds: any;
856
- declare function createNewItem({ modelName, modelFileId, ...propertyData }: {
857
- [x: string]: any;
858
- modelName: any;
859
- modelFileId: any;
860
- }): Promise<{
861
- modelName: any;
862
- seedLocalId: any;
863
- versionLocalId: string;
864
- }>;
865
- /** Runs `write` once per chunk of `values`, one after another (deletes / updates with an `IN` list). */
866
- declare function writeInBatches(values: any, write: any, size?: number): Promise<void>;
867
- declare function getEasSchemaForItemProperty({ schemaUid, propertyName, easDataType, }: {
868
- schemaUid: any;
869
- propertyName: any;
870
- easDataType: any;
871
- }): Promise<{
872
- __typename?: "Schema";
873
- id: string;
874
- schema: string;
875
- schemaNames: Array<{
876
- __typename?: "SchemaName";
877
- name: string;
878
- }>;
879
- } | undefined>;
880
- declare function getGetPublisherForNewSeeds(): any;
881
- /**
882
- * Metadata rows of a seed numbered per property_name in reader order (`rowNum = 1` is the value to
883
- * show): live rows before revoked ones, then newest first. See `compareMetadataRowsLatestFirst`.
1073
+ * Thrown by write operations (save, destroy, publish, unpublish) on an item none
1074
+ * of the client's addresses own. See isItemOwned for what counts as owned.
884
1075
  */
885
- declare function getMetadataLatest({ seedLocalId, seedUid }: {
886
- seedLocalId: any;
887
- seedUid: any;
888
- }): any;
1076
+ declare class OwnershipError extends Error {
1077
+ constructor(message?: string);
1078
+ }
889
1079
  import { BehaviorSubject } from 'rxjs';
890
- export { unloadEntity as $, getPublishExecutor as A, getRevokeExecutor as B, ClientManagerState as C, DEFAULT_READY_TIMEOUT_MS as D, getUploadExecutor as E, getVersionData$1 as F, isLocalUnsealedDraft as G, isSeedRowOwned as H, Item as I, localUnsealedDraftSql as J, ownedPublisherSql as K, ownedSeedsSql as L, METADATA_LATEST_FIRST_ORDER_SQL as M, pickLatestMetadataRowPerProperty as N, OwnershipError as O, PUBLISH_NOT_CONFIGURED_MESSAGE as P, placeholderUidSql as Q, propertyMachine as R, publisherInAddressListSql as S, publisherIsInOwnedSet as T, setAdditionalSyncAddresses as U, setGetPublisherForNewSeeds as V, setPublishExecutor as W, setRevokeExecutor as X, setUploadExecutor as Y, getInvariantSafePropertyDescriptor as Z, clearDestroySubscriptions as _, ItemProperty as a, ClientManagerEvents as a0, withLockedItemStorageRow as a1, getItemStorageFilePath as a2, writeItemStorageFile as a3, resolvePublisherFromSeedRow as a4, getPropertyData$1 as a5, Item$1 as a6, ItemPropertySaveValidationError as b, assertItemOwned as c, waitForEntityIdle as d, compareMetadataRowsLatestFirst as e, getEasSchemaUidForModel as f, getItemData as g, getLatestPublishedVersionRow as h, isItemOwned as i, chunkValues as j, getGetAdditionalSyncAddresses as k, isVersionRevoked as l, createReactiveProxy as m, findEntity as n, forceRemoveFromCaches as o, parseListPropertyValueFromStorage as p, runDestroyLifecycle as q, rowsPerInsert as r, selectInBatches as s, isPublishedMetadataRow as t, MachineIds as u, createNewItem as v, writeInBatches as w, getEasSchemaForItemProperty as x, getGetPublisherForNewSeeds as y, getMetadataLatest as z };
891
- //# sourceMappingURL=Item-D6j0IvBP.d.ts.map
1080
+ export { getGetPublisherForNewSeeds as $, assertItemOwned as A, isItemOwned as B, waitForEntityIdle as C, compareMetadataRowsLatestFirst as D, getEasSchemaUidForModel as E, getLatestPublishedVersionRow as F, parseListPropertyValueFromStorage as G, chunkValues as H, Item as I, rowsPerInsert as J, getGetAdditionalSyncAddresses as K, selectInBatches as L, METADATA_LATEST_FIRST_ORDER_SQL as M, isVersionRevoked as N, OUTBOX_DEFER_MS as O, isActorStopped as P, DEFAULT_READY_TIMEOUT_MS as Q, createReactiveProxy as R, sameEntity as S, findEntity as T, forceRemoveFromCaches as U, runDestroyLifecycle as V, isPublishedMetadataRow as W, ClientManagerState as X, MachineIds as Y, PUBLISH_NOT_CONFIGURED_MESSAGE as Z, createNewItem as _, appendOutboxOpAndWait as a, getMetadataLatest as a0, getPublishExecutor as a1, getRevokeExecutor as a2, getUploadExecutor as a3, getVersionData$1 as a4, isLocalUnsealedDraft as a5, isSeedRowOwned as a6, localUnsealedDraftSql as a7, ownedPublisherSql as a8, ownedSeedsSql as a9, pickLatestMetadataRowPerProperty as aa, placeholderUidSql as ab, propertyMachine as ac, publisherInAddressListSql as ad, publisherIsInOwnedSet as ae, setAdditionalSyncAddresses as af, setGetPublisherForNewSeeds as ag, setPublishExecutor as ah, setRevokeExecutor as ai, setUploadExecutor as aj, ActorKeyedState as ak, clearDestroySubscriptions as al, unloadEntity as am, ClientManagerEvents as an, resolvePublisherFromSeedRow as ao, getSeedPublisher as ap, propertyNameVariants as aq, createSeed as ar, createMetadata as as, updateItemPropertyValue as at, getPropertyData$1 as au, Item$1 as av, waitForOutboxOp as b, appendOutboxOp as c, OUTBOX_MAX_ATTEMPTS as d, OUTBOX_PRUNE_AFTER_MS as e, OUTBOX_PRUNE_FAILED_AFTER_MS as f, getOutboxOps as g, OUTBOX_RETRY_DELAYS_MS as h, OutboxOpDeferredError as i, OutboxOpFailedError as j, OutboxOpRejectedError as k, OutboxOpRetryableError as l, appendOutboxOps as m, drainOutbox as n, outboxOpResult as o, getPendingSetValue as p, outboxOpValue as q, pruneOutbox as r, registerOutboxApplier as s, startOutbox as t, writeInBatches as u, getItemData as v, waitForPendingOutboxOps as w, ItemProperty as x, ItemPropertySaveValidationError as y, OwnershipError as z };
1081
+ //# sourceMappingURL=Item-DZfNz7xl.d.ts.map