@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.
- package/dist/{ClientManager-2GtDWHq6.js → ClientManager-Dcju5x4k.js} +835 -80
- package/dist/ClientManager-Dcju5x4k.js.map +1 -0
- package/dist/{Item-D6j0IvBP.js → Item-DZfNz7xl.js} +2145 -1354
- package/dist/Item-DZfNz7xl.js.map +1 -0
- package/dist/{ModelProperty-B52C3CQ2.js → ModelProperty-sMGL-_LK.js} +51 -52
- package/dist/ModelProperty-sMGL-_LK.js.map +1 -0
- package/dist/{Schema-O1QLoXv6.js → Schema-D-TczaIj.js} +106 -91
- package/dist/Schema-D-TczaIj.js.map +1 -0
- package/dist/{SchemaValidationService-BxCbfDaI.js → SchemaValidationService-NYTtSCxd.js} +6 -6
- package/dist/{SchemaValidationService-BxCbfDaI.js.map → SchemaValidationService-NYTtSCxd.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-CzSbuucw.js → backfillMetadataPropertyIds-DEvD0OAT.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-CzSbuucw.js.map → backfillMetadataPropertyIds-DEvD0OAT.js.map} +1 -1
- package/dist/{configurePlatform-Bbpw_R4y.js → configurePlatform-CtA7fydC.js} +2 -2
- package/dist/{configurePlatform-Bbpw_R4y.js.map → configurePlatform-CtA7fydC.js.map} +1 -1
- package/dist/db/drizzle/0020_add_pending_writes.sql +24 -0
- package/dist/db/drizzle/0021_add_pending_write_error_name.sql +1 -0
- package/dist/db/drizzle/meta/0020_snapshot.json +1542 -0
- package/dist/db/drizzle/meta/0021_snapshot.json +1549 -0
- package/dist/db/drizzle/meta/_journal.json +14 -0
- package/dist/{detachRowsBeforeDelete-D1TyEMco.js → detachRowsBeforeDelete-CLbBbpX4.js} +2 -2
- package/dist/{detachRowsBeforeDelete-D1TyEMco.js.map → detachRowsBeforeDelete-CLbBbpX4.js.map} +1 -1
- package/dist/dist/{ClientManager-2GtDWHq6.d.ts → ClientManager-Dcju5x4k.d.ts} +393 -292
- package/dist/dist/ClientManager-Dcju5x4k.d.ts.map +1 -0
- package/dist/dist/{Item-D6j0IvBP.d.ts → Item-DZfNz7xl.d.ts} +456 -266
- package/dist/dist/Item-DZfNz7xl.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-B52C3CQ2.d.ts → ModelProperty-sMGL-_LK.d.ts} +1 -1
- package/dist/dist/{ModelProperty-B52C3CQ2.d.ts.map → ModelProperty-sMGL-_LK.d.ts.map} +1 -1
- package/dist/dist/{Schema-O1QLoXv6.d.ts → Schema-D-TczaIj.d.ts} +11 -4
- package/dist/dist/Schema-D-TczaIj.d.ts.map +1 -0
- package/dist/dist/{SchemaValidationService-BxCbfDaI.d.ts → SchemaValidationService-NYTtSCxd.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-BxCbfDaI.d.ts.map → SchemaValidationService-NYTtSCxd.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-CzSbuucw.d.ts → backfillMetadataPropertyIds-DEvD0OAT.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-DEvD0OAT.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-Bbpw_R4y.d.ts → configurePlatform-CtA7fydC.d.ts} +1 -1
- package/dist/dist/configurePlatform-CtA7fydC.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-D1TyEMco.d.ts → detachRowsBeforeDelete-CLbBbpX4.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-CLbBbpX4.d.ts.map +1 -0
- package/dist/dist/{eas-DOdj-EMK.d.ts → eas-CcpQiXum.d.ts} +1 -1
- package/dist/dist/eas-CcpQiXum.d.ts.map +1 -0
- package/dist/dist/{errors-KM-yq2MD.d.ts → errors-BGk_IJO5.d.ts} +39 -24
- package/dist/dist/errors-BGk_IJO5.d.ts.map +1 -0
- package/dist/dist/{getItem-Bh0zv-o1.d.ts → getItem-CHSX3aMm.d.ts} +1 -1
- package/dist/dist/getItem-CHSX3aMm.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-oH8wJhnH.d.ts → getPublishPayload-DMd4oLir.d.ts} +1 -1
- package/dist/dist/getPublishPayload-DMd4oLir.d.ts.map +1 -0
- package/dist/dist/{getPublishUploads-Cex-NBe6.d.ts → getPublishUploads-C9FnRG9c.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-Cex-NBe6.d.ts.map → getPublishUploads-C9FnRG9c.d.ts.map} +1 -1
- package/dist/dist/{index-BbFwftAv.d.ts → index-C--KAWoe.d.ts} +378 -1
- package/dist/dist/{index-BbFwftAv.d.ts.map → index-C--KAWoe.d.ts.map} +1 -1
- package/dist/dist/{index-DpgQMIRq.d.ts → index-CI0NFf4B.d.ts} +836 -426
- package/dist/dist/index-CI0NFf4B.d.ts.map +1 -0
- package/dist/dist/{index-BAao3_Po.d.ts → index-Ccmd9_KY.d.ts} +5 -5
- package/dist/dist/index-Ccmd9_KY.d.ts.map +1 -0
- package/dist/dist/index-l3b6p1Ih.d.ts +14 -0
- package/dist/dist/index-l3b6p1Ih.d.ts.map +1 -0
- package/dist/dist/{index.browser-nndbVM7z.d.ts → index.browser-kY8M-xUA.d.ts} +2892 -1754
- package/dist/dist/{index.browser-nndbVM7z.d.ts.map → index.browser-kY8M-xUA.d.ts.map} +1 -1
- package/dist/dist/{index.node-BUfx-JaP.d.ts → index.node-Ba2KbmOq.d.ts} +4125 -2613
- package/dist/dist/{index.node-BUfx-JaP.d.ts.map → index.node-Ba2KbmOq.d.ts.map} +1 -1
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-BDBvImLs.d.ts → property-CO7pKTWK.d.ts} +3 -3
- package/dist/dist/property-CO7pKTWK.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BlfLn4rP.d.ts → propertyValidationRules-D5HZy0Bq.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-D5HZy0Bq.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CLO85LLz.d.ts → publishDraftGraph-B5KPqtbg.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CLO85LLz.d.ts.map → publishDraftGraph-B5KPqtbg.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts → resetAmbiguousLegacyItemData-77CZ8HT7.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-77CZ8HT7.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-DFr4COc4.d.ts → resolveModelForSyncedSeed-DHOq_FGs.d.ts} +1 -1
- package/dist/dist/resolveModelForSyncedSeed-DHOq_FGs.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-CAOlw3i-.d.ts → syncDbWithEas-BZ6AI-IC.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-BZ6AI-IC.d.ts.map +1 -0
- package/dist/dist/{tabEvents-DksXwk3X.d.ts → tabEvents-CIlzHSKZ.d.ts} +35 -18
- package/dist/dist/tabEvents-CIlzHSKZ.d.ts.map +1 -0
- package/dist/dist/{tolerantWebAccess-CEIjFGf0.d.ts → tolerantWebAccess-BwJ8bElF.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-CEIjFGf0.d.ts.map → tolerantWebAccess-BwJ8bElF.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-Cjr35YjE.d.ts → updateSeedRevokedAt-ClxMSXcB.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-ClxMSXcB.d.ts.map +1 -0
- package/dist/{eas-DOdj-EMK.js → eas-CcpQiXum.js} +4 -4
- package/dist/{eas-DOdj-EMK.js.map → eas-CcpQiXum.js.map} +1 -1
- package/dist/{errors-KM-yq2MD.js → errors-BGk_IJO5.js} +222 -275
- package/dist/errors-BGk_IJO5.js.map +1 -0
- package/dist/{getItem-Bh0zv-o1.js → getItem-CHSX3aMm.js} +5 -5
- package/dist/{getItem-Bh0zv-o1.js.map → getItem-CHSX3aMm.js.map} +1 -1
- package/dist/{getPublishPayload-oH8wJhnH.js → getPublishPayload-DMd4oLir.js} +18 -15
- package/dist/getPublishPayload-DMd4oLir.js.map +1 -0
- package/dist/{getPublishUploads-Cex-NBe6.js → getPublishUploads-C9FnRG9c.js} +9 -6
- package/dist/getPublishUploads-C9FnRG9c.js.map +1 -0
- package/dist/{index-BbFwftAv.js → index-C--KAWoe.js} +3 -2
- package/dist/index-C--KAWoe.js.map +1 -0
- package/dist/{index-DpgQMIRq.js → index-CI0NFf4B.js} +132 -9
- package/dist/index-CI0NFf4B.js.map +1 -0
- package/dist/{index-BAao3_Po.js → index-Ccmd9_KY.js} +8 -8
- package/dist/index-Ccmd9_KY.js.map +1 -0
- package/dist/index-l3b6p1Ih.js +28 -0
- package/dist/index-l3b6p1Ih.js.map +1 -0
- package/dist/{index.browser-nndbVM7z.js → index.browser-kY8M-xUA.js} +284 -73
- package/dist/index.browser-kY8M-xUA.js.map +1 -0
- package/dist/{index.node-BUfx-JaP.js → index.node-Ba2KbmOq.js} +93 -6
- package/dist/index.node-Ba2KbmOq.js.map +1 -0
- package/dist/main.js +84 -26
- package/dist/main.js.map +1 -1
- package/dist/node.js +11 -11
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-BDBvImLs.js → property-CO7pKTWK.js} +9 -11
- package/dist/property-CO7pKTWK.js.map +1 -0
- package/dist/{propertyValidationRules-BlfLn4rP.js → propertyValidationRules-D5HZy0Bq.js} +10 -10
- package/dist/{propertyValidationRules-BlfLn4rP.js.map → propertyValidationRules-D5HZy0Bq.js.map} +1 -1
- package/dist/{publishDraftGraph-CLO85LLz.js → publishDraftGraph-B5KPqtbg.js} +6 -6
- package/dist/{publishDraftGraph-CLO85LLz.js.map → publishDraftGraph-B5KPqtbg.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.js → resetAmbiguousLegacyItemData-77CZ8HT7.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-Cy8ik7xk.js.map → resetAmbiguousLegacyItemData-77CZ8HT7.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-DFr4COc4.js → resolveModelForSyncedSeed-DHOq_FGs.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-DFr4COc4.js.map → resolveModelForSyncedSeed-DHOq_FGs.js.map} +1 -1
- package/dist/seedSchema/PendingWriteSchema.ts +57 -0
- package/dist/seedSchema/index.ts +1 -0
- package/dist/src/Item/Item.d.ts +38 -7
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +66 -9
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts +5 -0
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts +22 -0
- package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts.map +1 -0
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts +50 -9
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/Model/service/actors/validateModel.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts.map +1 -1
- package/dist/src/Schema/Schema.d.ts +22 -3
- package/dist/src/Schema/Schema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/createModelInstances.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
- package/dist/src/browser/db/Db.d.ts +7 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/db/drizzleFiles.d.ts +4 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/browser/db/sqliteBusyRetry.d.ts.map +1 -1
- package/dist/src/browser/helpers/EasClient.d.ts +1 -1
- package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +13 -0
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/client/addressesPersisted.d.ts +10 -0
- package/dist/src/client/addressesPersisted.d.ts.map +1 -0
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/db/Db/BaseDb.d.ts +10 -0
- package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
- package/dist/src/db/read/getItemProperties.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getSeedData.d.ts +4 -1
- package/dist/src/db/read/getSeedData.d.ts.map +1 -1
- package/dist/src/db/read/getSeedPublisher.d.ts +4 -1
- package/dist/src/db/read/getSeedPublisher.d.ts.map +1 -1
- package/dist/src/db/read/getVersionData.d.ts +4 -1
- package/dist/src/db/read/getVersionData.d.ts.map +1 -1
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts +6 -0
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts +13 -0
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/createNewItem.d.ts +5 -0
- package/dist/src/db/write/createNewItem.d.ts.map +1 -1
- package/dist/src/db/write/createSeed.d.ts +20 -1
- package/dist/src/db/write/createSeed.d.ts.map +1 -1
- package/dist/src/db/write/createVersion.d.ts +5 -1
- package/dist/src/db/write/createVersion.d.ts.map +1 -1
- package/dist/src/db/write/removeLocalCopiesForAddresses.d.ts +9 -2
- package/dist/src/db/write/removeLocalCopiesForAddresses.d.ts.map +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts +9 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/db/write/updateMetadata.d.ts +8 -1
- package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +4 -2
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCache.d.ts +2 -42
- package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCommon.d.ts +9 -0
- package/dist/src/helpers/entity/entityCommon.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityDestroy.d.ts +13 -7
- package/dist/src/helpers/entity/entityDestroy.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityLiveQuery.d.ts +3 -2
- package/dist/src/helpers/entity/entityLiveQuery.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityState.d.ts +28 -0
- package/dist/src/helpers/entity/entityState.d.ts.map +1 -0
- package/dist/src/helpers/entity/entityUnload.d.ts +3 -2
- package/dist/src/helpers/entity/entityUnload.d.ts.map +1 -1
- package/dist/src/helpers/entity/index.d.ts +1 -0
- package/dist/src/helpers/entity/index.d.ts.map +1 -1
- package/dist/src/helpers/itemStorageFile.d.ts +7 -0
- package/dist/src/helpers/itemStorageFile.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +6 -0
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/helpers/property.d.ts.map +1 -1
- package/dist/src/helpers/propertySchemaUid.d.ts +13 -0
- package/dist/src/helpers/propertySchemaUid.d.ts.map +1 -0
- package/dist/src/helpers/propertyWriteTickets.d.ts +11 -0
- package/dist/src/helpers/propertyWriteTickets.d.ts.map +1 -0
- package/dist/src/helpers/reactiveProxy.d.ts +18 -0
- package/dist/src/helpers/reactiveProxy.d.ts.map +1 -1
- package/dist/src/helpers/sessionObjectUrls.d.ts +4 -0
- package/dist/src/helpers/sessionObjectUrls.d.ts.map +1 -0
- package/dist/src/helpers/tabCoordinator.d.ts +9 -0
- package/dist/src/helpers/tabCoordinator.d.ts.map +1 -1
- package/dist/src/helpers/tabLocks.d.ts +11 -0
- package/dist/src/helpers/tabLocks.d.ts.map +1 -1
- package/dist/src/helpers/timing.d.ts +10 -0
- package/dist/src/helpers/timing.d.ts.map +1 -0
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IDb.d.ts +2 -0
- package/dist/src/interfaces/IDb.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +1 -0
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +5 -0
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts +3 -0
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/node/db/singleConnectionTransactions.d.ts +22 -0
- package/dist/src/node/db/singleConnectionTransactions.d.ts.map +1 -0
- package/dist/src/outbox/conflicts.d.ts +60 -0
- package/dist/src/outbox/conflicts.d.ts.map +1 -0
- package/dist/src/outbox/index.d.ts +9 -0
- package/dist/src/outbox/index.d.ts.map +1 -0
- package/dist/src/outbox/itemAppliers.d.ts +153 -0
- package/dist/src/outbox/itemAppliers.d.ts.map +1 -0
- package/dist/src/outbox/outbox.d.ts +143 -0
- package/dist/src/outbox/outbox.d.ts.map +1 -0
- package/dist/src/outbox/pendingValues.d.ts +27 -0
- package/dist/src/outbox/pendingValues.d.ts.map +1 -0
- package/dist/src/seedSchema/PendingWriteSchema.d.ts +385 -0
- package/dist/src/seedSchema/PendingWriteSchema.d.ts.map +1 -0
- package/dist/src/seedSchema/index.d.ts +1 -0
- package/dist/src/seedSchema/index.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +5 -0
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CAOlw3i-.js → syncDbWithEas-BZ6AI-IC.js} +25 -20
- package/dist/syncDbWithEas-BZ6AI-IC.js.map +1 -0
- package/dist/{tabEvents-DksXwk3X.js → tabEvents-CIlzHSKZ.js} +56 -25
- package/dist/tabEvents-CIlzHSKZ.js.map +1 -0
- package/dist/{tolerantWebAccess-CEIjFGf0.js → tolerantWebAccess-BwJ8bElF.js} +6 -6
- package/dist/{tolerantWebAccess-CEIjFGf0.js.map → tolerantWebAccess-BwJ8bElF.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-Cjr35YjE.js → updateSeedRevokedAt-ClxMSXcB.js} +3 -3
- package/dist/{updateSeedRevokedAt-Cjr35YjE.js.map → updateSeedRevokedAt-ClxMSXcB.js.map} +1 -1
- package/package.json +7 -7
- package/dist/ClientManager-2GtDWHq6.js.map +0 -1
- package/dist/Item-D6j0IvBP.js.map +0 -1
- package/dist/ModelProperty-B52C3CQ2.js.map +0 -1
- package/dist/Schema-O1QLoXv6.js.map +0 -1
- package/dist/discardNewDraft-hiVaUVjV.js +0 -78
- package/dist/discardNewDraft-hiVaUVjV.js.map +0 -1
- package/dist/dist/ClientManager-2GtDWHq6.d.ts.map +0 -1
- package/dist/dist/Item-D6j0IvBP.d.ts.map +0 -1
- package/dist/dist/Schema-O1QLoXv6.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +0 -1
- package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +0 -1
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts +0 -8
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +0 -1
- package/dist/dist/eas-DOdj-EMK.d.ts.map +0 -1
- package/dist/dist/errors-KM-yq2MD.d.ts.map +0 -1
- package/dist/dist/getItem-Bh0zv-o1.d.ts.map +0 -1
- package/dist/dist/getPublishPayload-oH8wJhnH.d.ts.map +0 -1
- package/dist/dist/index-BAao3_Po.d.ts.map +0 -1
- package/dist/dist/index-DpgQMIRq.d.ts.map +0 -1
- package/dist/dist/property-BDBvImLs.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +0 -1
- package/dist/dist/tabEvents-DksXwk3X.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +0 -1
- package/dist/errors-KM-yq2MD.js.map +0 -1
- package/dist/getPublishPayload-oH8wJhnH.js.map +0 -1
- package/dist/getPublishUploads-Cex-NBe6.js.map +0 -1
- package/dist/index-BAao3_Po.js.map +0 -1
- package/dist/index-BbFwftAv.js.map +0 -1
- package/dist/index-DpgQMIRq.js.map +0 -1
- package/dist/index.browser-nndbVM7z.js.map +0 -1
- package/dist/index.node-BUfx-JaP.js.map +0 -1
- package/dist/property-BDBvImLs.js.map +0 -1
- package/dist/src/db/write/discardNewDraft.d.ts +0 -8
- package/dist/src/db/write/discardNewDraft.d.ts.map +0 -1
- package/dist/src/helpers/propertyWriteQueue.d.ts +0 -15
- package/dist/src/helpers/propertyWriteQueue.d.ts.map +0 -1
- package/dist/syncDbWithEas-CAOlw3i-.js.map +0 -1
- package/dist/tabEvents-DksXwk3X.js.map +0 -1
|
@@ -1,133 +1,3 @@
|
|
|
1
|
-
declare function requestEasSyncFromEventBus(): void;
|
|
2
|
-
declare function requestEasSyncFromModelsInit(): void;
|
|
3
|
-
declare namespace ClientManager {
|
|
4
|
-
function isInitialized(): any;
|
|
5
|
-
function getService(): import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
6
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
src: "platformClassesInit";
|
|
9
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
10
|
-
id: string | undefined;
|
|
11
|
-
} | {
|
|
12
|
-
src: "fileSystemInit";
|
|
13
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
14
|
-
id: string | undefined;
|
|
15
|
-
} | {
|
|
16
|
-
src: "dbInit";
|
|
17
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
18
|
-
id: string | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
src: "saveConfig";
|
|
21
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
22
|
-
id: string | undefined;
|
|
23
|
-
} | {
|
|
24
|
-
src: "addModelsToStore";
|
|
25
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
26
|
-
id: string | undefined;
|
|
27
|
-
} | {
|
|
28
|
-
src: "addModelsToDb";
|
|
29
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
30
|
-
id: string | undefined;
|
|
31
|
-
} | {
|
|
32
|
-
src: "processSchemaFiles";
|
|
33
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
34
|
-
id: string | undefined;
|
|
35
|
-
} | {
|
|
36
|
-
src: "saveAppState";
|
|
37
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
38
|
-
id: string | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
type: "assignInitError";
|
|
41
|
-
params: import("xstate").NonReducibleUnknown;
|
|
42
|
-
}, never, never, {}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
43
|
-
id?: string | undefined | undefined;
|
|
44
|
-
states?: {} | undefined;
|
|
45
|
-
}, import("xstate").MetaObject>>;
|
|
46
|
-
function init(options: any): Promise<void>;
|
|
47
|
-
function setAddresses(addresses: any): Promise<void>;
|
|
48
|
-
function getAddresses(): Promise<{
|
|
49
|
-
owned: any;
|
|
50
|
-
watched: any;
|
|
51
|
-
}>;
|
|
52
|
-
function getOwnedAddresses(): Promise<any>;
|
|
53
|
-
function getWatchedAddresses(): Promise<any>;
|
|
54
|
-
function claimUnpublishedDrafts(publisher: any): Promise<{
|
|
55
|
-
seeds: any;
|
|
56
|
-
versions: number;
|
|
57
|
-
metadata: number;
|
|
58
|
-
seedLocalIds: any;
|
|
59
|
-
}>;
|
|
60
|
-
function removeLocalCopiesForAddresses(addresses: any): Promise<{
|
|
61
|
-
removedSeedLocalIds: any;
|
|
62
|
-
removedSeedUids: any;
|
|
63
|
-
}>;
|
|
64
|
-
function syncFromEas(options: any): Promise<void>;
|
|
65
|
-
function addModel(modelDef: any): Promise<void>;
|
|
66
|
-
function onReady(callback: any): () => void;
|
|
67
|
-
function stop(): void;
|
|
68
|
-
function unload(): void;
|
|
69
|
-
}
|
|
70
|
-
declare function sendEasSyncClientRequest(correlationId: any, options: any): void;
|
|
71
|
-
/** appState key recording which EAS chain the local database holds attestations from. */
|
|
72
|
-
declare const EAS_CHAIN_ID_APP_STATE_KEY: "easChainId";
|
|
73
|
-
/**
|
|
74
|
-
* Turns retries without an explicit `enabled` on or off; `undefined` restores the default.
|
|
75
|
-
* Returns the previous setting, so a test can put it back.
|
|
76
|
-
*/
|
|
77
|
-
declare function setRetriesWhenOnlineEnabled(enabled: any): any;
|
|
78
|
-
declare function startEasSyncActor(): void;
|
|
79
|
-
/** Unregister local query source (tests / client unload). */
|
|
80
|
-
declare function unregisterSeedQueryLocalSource(): void;
|
|
81
|
-
declare const INIT_CONFIG_CONFLICT_MESSAGE: string;
|
|
82
|
-
/**
|
|
83
|
-
* For callers of createModelsFromJson that write the models with addModelsToDb: pass `promise` as its
|
|
84
|
-
* persistedBy and call `settle` once addModelsToDb has run or failed (in a finally). The new models wait
|
|
85
|
-
* for it, then adopt the rows addModelsToDb wrote; any model it didn't write writes itself.
|
|
86
|
-
*/
|
|
87
|
-
declare function createRowsWrittenSignal(): {
|
|
88
|
-
promise: Promise<any>;
|
|
89
|
-
settle: undefined;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Convert JSON import schema to ModelDefinitions
|
|
93
|
-
* @param importData - The JSON import data
|
|
94
|
-
* @param modelFileIds - Optional map of model names to their file IDs from the JSON file
|
|
95
|
-
* @param propertyFileIds - Optional map of model names to maps of property names to their file IDs from the JSON file
|
|
96
|
-
* @param persistedBy - When the caller writes the models with addModelsToDb: a promise that settles once
|
|
97
|
-
* that has run (see createRowsWrittenSignal). New models then adopt those rows instead of writing them too.
|
|
98
|
-
* @returns ModelDefinitions object with Model classes
|
|
99
|
-
*/
|
|
100
|
-
declare function createModelsFromJson(importData: any, modelFileIds: any, propertyFileIds: any, persistedBy: any): Promise<{}>;
|
|
101
|
-
/**
|
|
102
|
-
* Get the latest version number for a schema by name
|
|
103
|
-
* Only considers complete schema files (with $schema field)
|
|
104
|
-
* @param name - The name of the schema
|
|
105
|
-
* @returns The latest version number, or 0 if no schema found
|
|
106
|
-
*/
|
|
107
|
-
declare function getLatestSchemaVersion(name: any): Promise<any>;
|
|
108
|
-
/**
|
|
109
|
-
* Convert a JSON model's properties to the schema property format Model.create and addModelsToDb take
|
|
110
|
-
* @param modelName - The name of the model (for error messages)
|
|
111
|
-
* @param modelDef - The JSON model definition
|
|
112
|
-
* @param propertyFileIds - Optional map of property names to their file IDs from the JSON file
|
|
113
|
-
*/
|
|
114
|
-
declare function jsonPropertiesToSchemaProperties(modelName: any, modelDef: any, propertyFileIds: any): {};
|
|
115
|
-
declare var schema: Readonly<{
|
|
116
|
-
__proto__: null;
|
|
117
|
-
createSchema: (schema: any, schemaFileId: any) => Promise<void>;
|
|
118
|
-
deleteSchema: typeof deleteSchema;
|
|
119
|
-
filterLatestSchemas: typeof filterLatestSchemas;
|
|
120
|
-
findSchemaByName: typeof findSchemaByName;
|
|
121
|
-
getLatestSchemaVersion: typeof getLatestSchemaVersion;
|
|
122
|
-
getSchemaNameFromId: typeof getSchemaNameFromId;
|
|
123
|
-
listCompleteSchemaFiles: typeof listCompleteSchemaFiles;
|
|
124
|
-
listLatestSchemaFiles: typeof listLatestSchemaFiles;
|
|
125
|
-
listSchemaFiles: typeof listSchemaFiles;
|
|
126
|
-
loadAllSchemasFromDb: typeof loadAllSchemasFromDb;
|
|
127
|
-
migrateFileSchemasToDb: typeof migrateFileSchemasToDb;
|
|
128
|
-
readSchema: (name: any, version: any, schemaFileId: any) => Promise<any>;
|
|
129
|
-
updateSchema: typeof updateSchema;
|
|
130
|
-
}>;
|
|
131
1
|
declare var ClientManager$1: Readonly<{
|
|
132
2
|
__proto__: null;
|
|
133
3
|
CLIENT_ALREADY_STOPPED_WARNING: string;
|
|
@@ -174,6 +44,12 @@ declare var ClientManager$1: Readonly<{
|
|
|
174
44
|
id?: string | undefined | undefined;
|
|
175
45
|
states?: {} | undefined;
|
|
176
46
|
}, import("xstate").MetaObject>>;
|
|
47
|
+
/**
|
|
48
|
+
* Calls `listener` with the clientManager actor when it changes: `init()` after `stop()`
|
|
49
|
+
* replaces the actor, and `stop()` ends the current one. Subscribe to the actor itself for its
|
|
50
|
+
* state changes. Returns a function that removes the listener.
|
|
51
|
+
*/
|
|
52
|
+
subscribeService: (listener: any) => () => void;
|
|
177
53
|
/**
|
|
178
54
|
* Initialise the SDK. Calls made while an init is running share it. Once initialised, a
|
|
179
55
|
* call with the same config resolves at once and applies any change in `addresses`; a
|
|
@@ -192,12 +68,7 @@ declare var ClientManager$1: Readonly<{
|
|
|
192
68
|
* Sealed rows (real EAS uid or attestationRaw) are left unchanged.
|
|
193
69
|
* Use after `setAddresses` on connect; `setPublishWallet` does this automatically.
|
|
194
70
|
*/
|
|
195
|
-
claimUnpublishedDrafts: (publisher: any) => Promise<
|
|
196
|
-
seeds: any;
|
|
197
|
-
versions: number;
|
|
198
|
-
metadata: number;
|
|
199
|
-
seedLocalIds: any;
|
|
200
|
-
}>;
|
|
71
|
+
claimUnpublishedDrafts: (publisher: any) => Promise<any>;
|
|
201
72
|
/**
|
|
202
73
|
* Hard-delete local on-chain seed copies for the given publisher addresses.
|
|
203
74
|
* Drafts (no uid / attestationRaw) are kept. Chain is untouched; reconnect can rehydrate via syncFromEas.
|
|
@@ -305,6 +176,12 @@ declare var ClientManager$1: Readonly<{
|
|
|
305
176
|
id?: string | undefined | undefined;
|
|
306
177
|
states?: {} | undefined;
|
|
307
178
|
}, import("xstate").MetaObject>>;
|
|
179
|
+
/**
|
|
180
|
+
* Calls `listener` with the clientManager actor when it changes: `init()` after `stop()`
|
|
181
|
+
* replaces the actor, and `stop()` ends the current one. Subscribe to the actor itself for its
|
|
182
|
+
* state changes. Returns a function that removes the listener.
|
|
183
|
+
*/
|
|
184
|
+
subscribeService: (listener: any) => () => void;
|
|
308
185
|
/**
|
|
309
186
|
* Initialise the SDK. Calls made while an init is running share it. Once initialised, a
|
|
310
187
|
* call with the same config resolves at once and applies any change in `addresses`; a
|
|
@@ -323,12 +200,7 @@ declare var ClientManager$1: Readonly<{
|
|
|
323
200
|
* Sealed rows (real EAS uid or attestationRaw) are left unchanged.
|
|
324
201
|
* Use after `setAddresses` on connect; `setPublishWallet` does this automatically.
|
|
325
202
|
*/
|
|
326
|
-
claimUnpublishedDrafts: (publisher: any) => Promise<
|
|
327
|
-
seeds: any;
|
|
328
|
-
versions: number;
|
|
329
|
-
metadata: number;
|
|
330
|
-
seedLocalIds: any;
|
|
331
|
-
}>;
|
|
203
|
+
claimUnpublishedDrafts: (publisher: any) => Promise<any>;
|
|
332
204
|
/**
|
|
333
205
|
* Hard-delete local on-chain seed copies for the given publisher addresses.
|
|
334
206
|
* Drafts (no uid / attestationRaw) are kept. Chain is untouched; reconnect can rehydrate via syncFromEas.
|
|
@@ -352,6 +224,204 @@ declare var ClientManager$1: Readonly<{
|
|
|
352
224
|
unload: () => void;
|
|
353
225
|
};
|
|
354
226
|
}>;
|
|
227
|
+
/**
|
|
228
|
+
* Thin published-JSON helper: `getSeed` via the local (or auto) query source.
|
|
229
|
+
* Does not touch Item / drafts / liveQuery.
|
|
230
|
+
*
|
|
231
|
+
* Prefer this (or `@seedprotocol/query` `getSeed` / `queryBySchema`) for
|
|
232
|
+
* canonical published Seed JSON. Use `getItemData` / Item for draft-head authoring.
|
|
233
|
+
*/
|
|
234
|
+
declare function getPublishedSeedRecord(seedUid: any, options: any): Promise<import("@seedprotocol/query").GetSeedResult | null>;
|
|
235
|
+
/**
|
|
236
|
+
* Extract the schema name from a schemaId string
|
|
237
|
+
* @param schemaId - Schema ID in the format `${schemaName}-${schemaVersion}`
|
|
238
|
+
* @returns The schema name, or null if the format is invalid
|
|
239
|
+
*/
|
|
240
|
+
declare function getSchemaNameFromId(schemaId: any): string | null;
|
|
241
|
+
declare namespace ClientManager {
|
|
242
|
+
function isInitialized(): any;
|
|
243
|
+
function getService(): import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
244
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
src: "platformClassesInit";
|
|
247
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
248
|
+
id: string | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
src: "fileSystemInit";
|
|
251
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
252
|
+
id: string | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
src: "dbInit";
|
|
255
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
256
|
+
id: string | undefined;
|
|
257
|
+
} | {
|
|
258
|
+
src: "saveConfig";
|
|
259
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
260
|
+
id: string | undefined;
|
|
261
|
+
} | {
|
|
262
|
+
src: "addModelsToStore";
|
|
263
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
264
|
+
id: string | undefined;
|
|
265
|
+
} | {
|
|
266
|
+
src: "addModelsToDb";
|
|
267
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
268
|
+
id: string | undefined;
|
|
269
|
+
} | {
|
|
270
|
+
src: "processSchemaFiles";
|
|
271
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
272
|
+
id: string | undefined;
|
|
273
|
+
} | {
|
|
274
|
+
src: "saveAppState";
|
|
275
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
276
|
+
id: string | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
type: "assignInitError";
|
|
279
|
+
params: import("xstate").NonReducibleUnknown;
|
|
280
|
+
}, never, never, {}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
281
|
+
id?: string | undefined | undefined;
|
|
282
|
+
states?: {} | undefined;
|
|
283
|
+
}, import("xstate").MetaObject>>;
|
|
284
|
+
function subscribeService(listener: any): () => void;
|
|
285
|
+
function init(options: any): Promise<void>;
|
|
286
|
+
function setAddresses(addresses: any): Promise<void>;
|
|
287
|
+
function getAddresses(): Promise<{
|
|
288
|
+
owned: any;
|
|
289
|
+
watched: any;
|
|
290
|
+
}>;
|
|
291
|
+
function getOwnedAddresses(): Promise<any>;
|
|
292
|
+
function getWatchedAddresses(): Promise<any>;
|
|
293
|
+
function claimUnpublishedDrafts(publisher: any): Promise<any>;
|
|
294
|
+
function removeLocalCopiesForAddresses(addresses: any): Promise<{
|
|
295
|
+
removedSeedLocalIds: any;
|
|
296
|
+
removedSeedUids: any;
|
|
297
|
+
}>;
|
|
298
|
+
function syncFromEas(options: any): Promise<void>;
|
|
299
|
+
function addModel(modelDef: any): Promise<void>;
|
|
300
|
+
function onReady(callback: any): () => void;
|
|
301
|
+
function stop(): void;
|
|
302
|
+
function unload(): void;
|
|
303
|
+
}
|
|
304
|
+
declare function isSeedQueryLocalSourceRegistered(): boolean;
|
|
305
|
+
/** appState key recording which EAS chain the local database holds attestations from. */
|
|
306
|
+
declare const EAS_CHAIN_ID_APP_STATE_KEY: "easChainId";
|
|
307
|
+
declare function listCompleteSchemaFiles(): Promise<{
|
|
308
|
+
name: any;
|
|
309
|
+
version: any;
|
|
310
|
+
filePath: any;
|
|
311
|
+
schemaFileId: any;
|
|
312
|
+
}[]>;
|
|
313
|
+
declare function loadAllSchemasFromDb(): Promise<({
|
|
314
|
+
schema: any;
|
|
315
|
+
isDraft: boolean;
|
|
316
|
+
source: string;
|
|
317
|
+
schemaRecordId: any;
|
|
318
|
+
filePath?: undefined;
|
|
319
|
+
dbMatchesFile?: undefined;
|
|
320
|
+
} | {
|
|
321
|
+
schema: any;
|
|
322
|
+
isDraft: boolean;
|
|
323
|
+
source: string;
|
|
324
|
+
schemaRecordId: any;
|
|
325
|
+
filePath: any;
|
|
326
|
+
dbMatchesFile: boolean;
|
|
327
|
+
} | {
|
|
328
|
+
schema: any;
|
|
329
|
+
isDraft: boolean;
|
|
330
|
+
source: string;
|
|
331
|
+
schemaRecordId: any;
|
|
332
|
+
filePath: any;
|
|
333
|
+
dbMatchesFile?: undefined;
|
|
334
|
+
})[]>;
|
|
335
|
+
/**
|
|
336
|
+
* Merge multiple EAS sync intents: full sync (no concrete address list) wins;
|
|
337
|
+
* otherwise union addresses (first-seen casing).
|
|
338
|
+
*/
|
|
339
|
+
declare function mergeEasSyncRequestIntents(parts: any): {
|
|
340
|
+
addresses?: undefined;
|
|
341
|
+
} | {
|
|
342
|
+
addresses: any[];
|
|
343
|
+
};
|
|
344
|
+
declare const INIT_CONFIG_CONFLICT_MESSAGE: string;
|
|
345
|
+
/**
|
|
346
|
+
* Read a schema file by name and version
|
|
347
|
+
* @param name - The name of the schema
|
|
348
|
+
* @param version - The version of the schema
|
|
349
|
+
* @param schemaFileId - Schema file ID (required)
|
|
350
|
+
* @returns The schema object, or null if not found
|
|
351
|
+
*/
|
|
352
|
+
declare function readSchema(name: any, version: any, schemaFileId: any): Promise<any>;
|
|
353
|
+
/**
|
|
354
|
+
* Register the SDK SQLite/files adapter with `@seedprotocol/query`.
|
|
355
|
+
* Safe to call multiple times; re-registers with a fresh adapter instance.
|
|
356
|
+
* No-op when the app DB is not ready yet (unless `force`).
|
|
357
|
+
*/
|
|
358
|
+
declare function registerSeedQueryLocalSource(options: any): boolean;
|
|
359
|
+
declare function requestEasSyncFromAddressChange(addresses: any): void;
|
|
360
|
+
declare function requestEasSyncFromEventBus(): void;
|
|
361
|
+
declare function requestEasSyncFromModelsInit(): void;
|
|
362
|
+
declare function sendEasSyncClientRequest(correlationId: any, options: any): void;
|
|
363
|
+
/**
|
|
364
|
+
* Turns retries without an explicit `enabled` on or off; `undefined` restores the default.
|
|
365
|
+
* Returns the previous setting, so a test can put it back.
|
|
366
|
+
*/
|
|
367
|
+
declare function setRetriesWhenOnlineEnabled(enabled: any): any;
|
|
368
|
+
declare function startEasSyncActor(): void;
|
|
369
|
+
/** A Relation value names a local seed that doesn't exist. */
|
|
370
|
+
declare class RelationTargetError extends Error {
|
|
371
|
+
constructor(targets: any);
|
|
372
|
+
targets: any;
|
|
373
|
+
}
|
|
374
|
+
/** Unregister local query source (tests / client unload). */
|
|
375
|
+
declare function unregisterSeedQueryLocalSource(): void;
|
|
376
|
+
/**
|
|
377
|
+
* For callers of createModelsFromJson that write the models with addModelsToDb: pass `promise` as its
|
|
378
|
+
* persistedBy and call `settle` once addModelsToDb has run or failed (in a finally). The new models wait
|
|
379
|
+
* for it, then adopt the rows addModelsToDb wrote; any model it didn't write writes itself.
|
|
380
|
+
*/
|
|
381
|
+
declare function createRowsWrittenSignal(): {
|
|
382
|
+
promise: Promise<any>;
|
|
383
|
+
settle: undefined;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* Convert JSON import schema to ModelDefinitions
|
|
387
|
+
* @param importData - The JSON import data
|
|
388
|
+
* @param modelFileIds - Optional map of model names to their file IDs from the JSON file
|
|
389
|
+
* @param propertyFileIds - Optional map of model names to maps of property names to their file IDs from the JSON file
|
|
390
|
+
* @param persistedBy - When the caller writes the models with addModelsToDb: a promise that settles once
|
|
391
|
+
* that has run (see createRowsWrittenSignal). New models then adopt those rows instead of writing them too.
|
|
392
|
+
* @returns ModelDefinitions object with Model classes
|
|
393
|
+
*/
|
|
394
|
+
declare function createModelsFromJson(importData: any, modelFileIds: any, propertyFileIds: any, persistedBy: any): Promise<{}>;
|
|
395
|
+
/**
|
|
396
|
+
* Get the latest version number for a schema by name
|
|
397
|
+
* Only considers complete schema files (with $schema field)
|
|
398
|
+
* @param name - The name of the schema
|
|
399
|
+
* @returns The latest version number, or 0 if no schema found
|
|
400
|
+
*/
|
|
401
|
+
declare function getLatestSchemaVersion(name: any): Promise<any>;
|
|
402
|
+
/**
|
|
403
|
+
* Convert a JSON model's properties to the schema property format Model.create and addModelsToDb take
|
|
404
|
+
* @param modelName - The name of the model (for error messages)
|
|
405
|
+
* @param modelDef - The JSON model definition
|
|
406
|
+
* @param propertyFileIds - Optional map of property names to their file IDs from the JSON file
|
|
407
|
+
*/
|
|
408
|
+
declare function jsonPropertiesToSchemaProperties(modelName: any, modelDef: any, propertyFileIds: any): {};
|
|
409
|
+
declare var schema: Readonly<{
|
|
410
|
+
__proto__: null;
|
|
411
|
+
createSchema: (schema: any, schemaFileId: any) => Promise<void>;
|
|
412
|
+
deleteSchema: typeof deleteSchema;
|
|
413
|
+
filterLatestSchemas: typeof filterLatestSchemas;
|
|
414
|
+
findSchemaByName: typeof findSchemaByName;
|
|
415
|
+
getLatestSchemaVersion: typeof getLatestSchemaVersion;
|
|
416
|
+
getSchemaNameFromId: typeof getSchemaNameFromId;
|
|
417
|
+
listCompleteSchemaFiles: typeof listCompleteSchemaFiles;
|
|
418
|
+
listLatestSchemaFiles: typeof listLatestSchemaFiles;
|
|
419
|
+
listSchemaFiles: typeof listSchemaFiles;
|
|
420
|
+
loadAllSchemasFromDb: typeof loadAllSchemasFromDb;
|
|
421
|
+
migrateFileSchemasToDb: typeof migrateFileSchemasToDb;
|
|
422
|
+
readSchema: (name: any, version: any, schemaFileId: any) => Promise<any>;
|
|
423
|
+
updateSchema: typeof updateSchema;
|
|
424
|
+
}>;
|
|
355
425
|
declare var SEEDPROTOCOL_Seed_Protocol_v1: Readonly<{
|
|
356
426
|
__proto__: null;
|
|
357
427
|
$schema: string;
|
|
@@ -569,6 +639,114 @@ declare var SEEDPROTOCOL_Seed_Protocol_v1: Readonly<{
|
|
|
569
639
|
};
|
|
570
640
|
version: number;
|
|
571
641
|
}>;
|
|
642
|
+
declare var conflicts: Readonly<{
|
|
643
|
+
__proto__: null;
|
|
644
|
+
findSetConflict: typeof findSetConflict;
|
|
645
|
+
getItemConflicts: typeof getItemConflicts;
|
|
646
|
+
getPropertyConflict: typeof getPropertyConflict;
|
|
647
|
+
keepLocalDraftsOverSyncedRows: typeof keepLocalDraftsOverSyncedRows;
|
|
648
|
+
markPropertyConflictsResolved: typeof markPropertyConflictsResolved;
|
|
649
|
+
recordPropertyEdit: typeof recordPropertyEdit;
|
|
650
|
+
}>;
|
|
651
|
+
declare var itemAppliers: Readonly<{
|
|
652
|
+
__proto__: null;
|
|
653
|
+
RelationTargetError: typeof RelationTargetError;
|
|
654
|
+
applyCreateItem: typeof applyCreateItem;
|
|
655
|
+
applyDelete: typeof applyDelete;
|
|
656
|
+
applyItemStorageValue: typeof applyItemStorageValue;
|
|
657
|
+
applyStorageValue: typeof applyStorageValue;
|
|
658
|
+
deleteFiles: typeof deleteFiles;
|
|
659
|
+
startItemOutbox: typeof startItemOutbox;
|
|
660
|
+
throwItemWriteError: typeof throwItemWriteError;
|
|
661
|
+
}>;
|
|
662
|
+
/** Writes a new item's rows on `db` (see CreateItemOp). */
|
|
663
|
+
declare function applyCreateItem(seedLocalId: any, value: any, db: any): Promise<{
|
|
664
|
+
seedLocalId: any;
|
|
665
|
+
versionLocalId: string;
|
|
666
|
+
}>;
|
|
667
|
+
declare function applyDelete(op: any, value: any, db: any): Promise<{
|
|
668
|
+
filePaths: string[];
|
|
669
|
+
}>;
|
|
670
|
+
/**
|
|
671
|
+
* Writes an ItemStorage value on `db`: the edit goes into the property's current local draft, or a
|
|
672
|
+
* new one when there is none or a published row is newer (readers show the newest row). A synced
|
|
673
|
+
* or derived row is published content and is never written to.
|
|
674
|
+
*/
|
|
675
|
+
declare function applyItemStorageValue(seedLocalId: any, propertyName: any, op: any, db: any): Promise<{
|
|
676
|
+
localId: any;
|
|
677
|
+
uid: any;
|
|
678
|
+
schemaUid: any;
|
|
679
|
+
fileName: any;
|
|
680
|
+
localStorageDir: any;
|
|
681
|
+
}>;
|
|
682
|
+
/** Deletes files after the op that removed their rows applied; best-effort. */
|
|
683
|
+
declare function deleteFiles(filePaths: any): Promise<void>;
|
|
684
|
+
/**
|
|
685
|
+
* The appliers for item ops (ADR 0019). Every tab registers them at init: the leader applies ops
|
|
686
|
+
* that other tabs appended.
|
|
687
|
+
*/
|
|
688
|
+
/**
|
|
689
|
+
* Writes a storage value's rows on `db`. The property's row is looked up here, on `db`, rather than
|
|
690
|
+
* taken from the edit: two quick edits of a property that had no row would otherwise both create one.
|
|
691
|
+
*/
|
|
692
|
+
declare function applyStorageValue(seedLocalId: any, propertyName: any, value: any, db: any): Promise<{
|
|
693
|
+
localId: any;
|
|
694
|
+
uid: any;
|
|
695
|
+
schemaUid: any;
|
|
696
|
+
} | null>;
|
|
697
|
+
/** The property's unresolved conflict, if it has one. */
|
|
698
|
+
declare function getPropertyConflict(seedLocalId: any, propertyName: any): Promise<any>;
|
|
699
|
+
/** The item's unresolved conflicts, the newest per property. */
|
|
700
|
+
declare function getItemConflicts(seedLocalId: any): Promise<any[]>;
|
|
701
|
+
/**
|
|
702
|
+
* Get refValueType from a property object with case-insensitive key lookup.
|
|
703
|
+
*/
|
|
704
|
+
declare function getRefValueType(prop: any): string | undefined;
|
|
705
|
+
declare function importJsonSchema(importFilePathOrContents: any, version?: number): Promise<any>;
|
|
706
|
+
/**
|
|
707
|
+
* Sync a canonical schema from a file path or inlined object to the database.
|
|
708
|
+
* A stored schema file with the same id and version but different content is overwritten (with a
|
|
709
|
+
* warning) instead of reused, and models dropped from the schema are unlinked from it.
|
|
710
|
+
* Called automatically at init when config.schema is provided.
|
|
711
|
+
*
|
|
712
|
+
* @param source - File path (string) or complete SchemaFileFormat object
|
|
713
|
+
*/
|
|
714
|
+
declare function syncSchemaFromSource(source: any): Promise<void>;
|
|
715
|
+
/**
|
|
716
|
+
* Transform import JSON format to full schema file format
|
|
717
|
+
* @param importData - The JSON import data
|
|
718
|
+
* @param version - The version number for the schema (defaults to 1)
|
|
719
|
+
* @returns The transformed schema file format
|
|
720
|
+
*/
|
|
721
|
+
declare function transformImportToSchemaFile(importData: any, version?: number): {
|
|
722
|
+
metadata: {
|
|
723
|
+
name: any;
|
|
724
|
+
createdAt: string;
|
|
725
|
+
updatedAt: string;
|
|
726
|
+
};
|
|
727
|
+
models: {};
|
|
728
|
+
enums: {};
|
|
729
|
+
migrations: {
|
|
730
|
+
version: number;
|
|
731
|
+
timestamp: string;
|
|
732
|
+
description: string;
|
|
733
|
+
changes: never[];
|
|
734
|
+
}[];
|
|
735
|
+
nameMatch?: any;
|
|
736
|
+
$schema: string;
|
|
737
|
+
version: number;
|
|
738
|
+
id: string;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Load an existing complete schema file and process its models
|
|
742
|
+
* This is used to load models from already-processed schema files into the store
|
|
743
|
+
* @param schemaFilePath - Path to the complete schema file (must have $schema field)
|
|
744
|
+
* @returns The file path of the schema
|
|
745
|
+
* @throws Error if file cannot be read, parsed, or is not a complete schema
|
|
746
|
+
*/
|
|
747
|
+
declare function loadSchemaFromFile(schemaFilePath: any): Promise<any>;
|
|
748
|
+
/** Marks the property's conflicts resolved. */
|
|
749
|
+
declare function markPropertyConflictsResolved(seedLocalId: any, propertyName: any): Promise<void>;
|
|
572
750
|
declare function getContentHash(data: any): Promise<string>;
|
|
573
751
|
/**
|
|
574
752
|
* A legacy ItemStorage draft row: a local edit (no attestation uid, not derived from one) that holds
|
|
@@ -600,18 +778,38 @@ declare function convertVerbatimItemStorageRow(localId: any, storage?: {}): Prom
|
|
|
600
778
|
* current chain on an empty DB; throws when the DB holds data from a different chain.
|
|
601
779
|
*/
|
|
602
780
|
declare function assertLocalDbChain(): Promise<void>;
|
|
781
|
+
/**
|
|
782
|
+
* Read and parse a JSON import file
|
|
783
|
+
* Supports two formats:
|
|
784
|
+
* 1. Minimal format: { name: string, models: {...} }
|
|
785
|
+
* 2. Complete schema format: { $schema: string, metadata: { name: string }, models: {...}, ... }
|
|
786
|
+
* @param filePath - Path to the JSON import file
|
|
787
|
+
* @returns The parsed JSON import data normalized to JsonImportSchema format
|
|
788
|
+
* @throws Error if file cannot be read or parsed
|
|
789
|
+
*/
|
|
790
|
+
declare function readJsonImportFile(filePath: any): Promise<{
|
|
791
|
+
models: any;
|
|
792
|
+
nameMatch?: any;
|
|
793
|
+
name: any;
|
|
794
|
+
}>;
|
|
795
|
+
/** Registers the item appliers and starts draining. Safe to call more than once. */
|
|
796
|
+
declare function startItemOutbox(): void;
|
|
797
|
+
/**
|
|
798
|
+
* Rethrows a failed item op's error as its caller expects it: OwnershipError when the drainer
|
|
799
|
+
* refused the op for ownership, else the OutboxOpFailedError as is.
|
|
800
|
+
*/
|
|
801
|
+
declare function throwItemWriteError(error: any): void;
|
|
603
802
|
/**
|
|
604
803
|
* Gives `publisher` to local drafts that belong to no wallet yet: seeds with no publisher, no real
|
|
605
804
|
* uid and no attestationRaw, and those seeds' versions and property rows that are unsealed too.
|
|
606
805
|
* Versions and property rows go only with their seed, so rows of a seed that already has a
|
|
607
806
|
* publisher are never claimed. Sealed rows (real EAS uid or attestationRaw) are never touched.
|
|
807
|
+
*
|
|
808
|
+
* Pending Item.create ops with no publisher get it too, in the same transaction: the drainer applies
|
|
809
|
+
* an op's value as its claim reads it (ADR 0019), so a create applied before or after this one ends
|
|
810
|
+
* up claimed either way.
|
|
608
811
|
*/
|
|
609
|
-
declare function claimUnpublishedDrafts(publisher: any): Promise<
|
|
610
|
-
seeds: any;
|
|
611
|
-
versions: number;
|
|
612
|
-
metadata: number;
|
|
613
|
-
seedLocalIds: any;
|
|
614
|
-
}>;
|
|
812
|
+
declare function claimUnpublishedDrafts(publisher: any): Promise<any>;
|
|
615
813
|
/**
|
|
616
814
|
* SDK local QueryDataSource: published Seeds/Versions/metadata from SQLite.
|
|
617
815
|
*
|
|
@@ -632,15 +830,10 @@ declare function createLocalQueryDataSource(): {
|
|
|
632
830
|
readStorageBody(ref: any): Promise<any>;
|
|
633
831
|
};
|
|
634
832
|
/**
|
|
635
|
-
*
|
|
636
|
-
|
|
637
|
-
declare function getRefValueType(prop: any): string | undefined;
|
|
638
|
-
/**
|
|
639
|
-
* Hard-delete the given seed local ids and related local rows (cascade).
|
|
640
|
-
* Does not touch schemas, app_state, or chain.
|
|
833
|
+
* Wait until the read chain is known before syncing. Only waits when `@seedprotocol/publish`
|
|
834
|
+
* is loaded but `initPublish` has not run, and no chain is configured or recorded locally.
|
|
641
835
|
*/
|
|
642
|
-
declare function
|
|
643
|
-
declare function importJsonSchema(importFilePathOrContents: any, version?: number): Promise<any>;
|
|
836
|
+
declare function waitForEasReadChain(timeoutMs?: number): Promise<void>;
|
|
644
837
|
/**
|
|
645
838
|
* Create a new schema file
|
|
646
839
|
* @param schema - The schema object to save
|
|
@@ -662,14 +855,6 @@ declare const easSyncActor: import("xstate").Actor<import("xstate").StateMachine
|
|
|
662
855
|
readonly afterRun: {};
|
|
663
856
|
};
|
|
664
857
|
}, import("xstate").MetaObject>>;
|
|
665
|
-
/**
|
|
666
|
-
* Load an existing complete schema file and process its models
|
|
667
|
-
* This is used to load models from already-processed schema files into the store
|
|
668
|
-
* @param schemaFilePath - Path to the complete schema file (must have $schema field)
|
|
669
|
-
* @returns The file path of the schema
|
|
670
|
-
* @throws Error if file cannot be read, parsed, or is not a complete schema
|
|
671
|
-
*/
|
|
672
|
-
declare function loadSchemaFromFile(schemaFilePath: any): Promise<any>;
|
|
673
858
|
declare function getClient(): {
|
|
674
859
|
isInitialized: () => any;
|
|
675
860
|
getService: () => import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
@@ -713,6 +898,12 @@ declare function getClient(): {
|
|
|
713
898
|
id?: string | undefined | undefined;
|
|
714
899
|
states?: {} | undefined;
|
|
715
900
|
}, import("xstate").MetaObject>>;
|
|
901
|
+
/**
|
|
902
|
+
* Calls `listener` with the clientManager actor when it changes: `init()` after `stop()`
|
|
903
|
+
* replaces the actor, and `stop()` ends the current one. Subscribe to the actor itself for its
|
|
904
|
+
* state changes. Returns a function that removes the listener.
|
|
905
|
+
*/
|
|
906
|
+
subscribeService: (listener: any) => () => void;
|
|
716
907
|
/**
|
|
717
908
|
* Initialise the SDK. Calls made while an init is running share it. Once initialised, a
|
|
718
909
|
* call with the same config resolves at once and applies any change in `addresses`; a
|
|
@@ -731,12 +922,7 @@ declare function getClient(): {
|
|
|
731
922
|
* Sealed rows (real EAS uid or attestationRaw) are left unchanged.
|
|
732
923
|
* Use after `setAddresses` on connect; `setPublishWallet` does this automatically.
|
|
733
924
|
*/
|
|
734
|
-
claimUnpublishedDrafts: (publisher: any) => Promise<
|
|
735
|
-
seeds: any;
|
|
736
|
-
versions: number;
|
|
737
|
-
metadata: number;
|
|
738
|
-
seedLocalIds: any;
|
|
739
|
-
}>;
|
|
925
|
+
claimUnpublishedDrafts: (publisher: any) => Promise<any>;
|
|
740
926
|
/**
|
|
741
927
|
* Hard-delete local on-chain seed copies for the given publisher addresses.
|
|
742
928
|
* Drafts (no uid / attestationRaw) are kept. Chain is untouched; reconnect can rehydrate via syncFromEas.
|
|
@@ -759,126 +945,6 @@ declare function getClient(): {
|
|
|
759
945
|
stop: () => void;
|
|
760
946
|
unload: () => void;
|
|
761
947
|
};
|
|
762
|
-
/**
|
|
763
|
-
* Thin published-JSON helper: `getSeed` via the local (or auto) query source.
|
|
764
|
-
* Does not touch Item / drafts / liveQuery.
|
|
765
|
-
*
|
|
766
|
-
* Prefer this (or `@seedprotocol/query` `getSeed` / `queryBySchema`) for
|
|
767
|
-
* canonical published Seed JSON. Use `getItemData` / Item for draft-head authoring.
|
|
768
|
-
*/
|
|
769
|
-
declare function getPublishedSeedRecord(seedUid: any, options: any): Promise<import("@seedprotocol/query").GetSeedResult | null>;
|
|
770
|
-
/**
|
|
771
|
-
* Extract the schema name from a schemaId string
|
|
772
|
-
* @param schemaId - Schema ID in the format `${schemaName}-${schemaVersion}`
|
|
773
|
-
* @returns The schema name, or null if the format is invalid
|
|
774
|
-
*/
|
|
775
|
-
declare function getSchemaNameFromId(schemaId: any): string | null;
|
|
776
|
-
declare function isSeedQueryLocalSourceRegistered(): boolean;
|
|
777
|
-
declare function listCompleteSchemaFiles(): Promise<{
|
|
778
|
-
name: any;
|
|
779
|
-
version: any;
|
|
780
|
-
filePath: any;
|
|
781
|
-
schemaFileId: any;
|
|
782
|
-
}[]>;
|
|
783
|
-
/**
|
|
784
|
-
* Read and parse a JSON import file
|
|
785
|
-
* Supports two formats:
|
|
786
|
-
* 1. Minimal format: { name: string, models: {...} }
|
|
787
|
-
* 2. Complete schema format: { $schema: string, metadata: { name: string }, models: {...}, ... }
|
|
788
|
-
* @param filePath - Path to the JSON import file
|
|
789
|
-
* @returns The parsed JSON import data normalized to JsonImportSchema format
|
|
790
|
-
* @throws Error if file cannot be read or parsed
|
|
791
|
-
*/
|
|
792
|
-
declare function readJsonImportFile(filePath: any): Promise<{
|
|
793
|
-
models: any;
|
|
794
|
-
nameMatch?: any;
|
|
795
|
-
name: any;
|
|
796
|
-
}>;
|
|
797
|
-
/**
|
|
798
|
-
* Sync a canonical schema from a file path or inlined object to the database.
|
|
799
|
-
* A stored schema file with the same id and version but different content is overwritten (with a
|
|
800
|
-
* warning) instead of reused, and models dropped from the schema are unlinked from it.
|
|
801
|
-
* Called automatically at init when config.schema is provided.
|
|
802
|
-
*
|
|
803
|
-
* @param source - File path (string) or complete SchemaFileFormat object
|
|
804
|
-
*/
|
|
805
|
-
declare function syncSchemaFromSource(source: any): Promise<void>;
|
|
806
|
-
/**
|
|
807
|
-
* Transform import JSON format to full schema file format
|
|
808
|
-
* @param importData - The JSON import data
|
|
809
|
-
* @param version - The version number for the schema (defaults to 1)
|
|
810
|
-
* @returns The transformed schema file format
|
|
811
|
-
*/
|
|
812
|
-
declare function transformImportToSchemaFile(importData: any, version?: number): {
|
|
813
|
-
metadata: {
|
|
814
|
-
name: any;
|
|
815
|
-
createdAt: string;
|
|
816
|
-
updatedAt: string;
|
|
817
|
-
};
|
|
818
|
-
models: {};
|
|
819
|
-
enums: {};
|
|
820
|
-
migrations: {
|
|
821
|
-
version: number;
|
|
822
|
-
timestamp: string;
|
|
823
|
-
description: string;
|
|
824
|
-
changes: never[];
|
|
825
|
-
}[];
|
|
826
|
-
nameMatch?: any;
|
|
827
|
-
$schema: string;
|
|
828
|
-
version: number;
|
|
829
|
-
id: string;
|
|
830
|
-
};
|
|
831
|
-
declare function loadAllSchemasFromDb(): Promise<({
|
|
832
|
-
schema: any;
|
|
833
|
-
isDraft: boolean;
|
|
834
|
-
source: string;
|
|
835
|
-
schemaRecordId: any;
|
|
836
|
-
filePath?: undefined;
|
|
837
|
-
dbMatchesFile?: undefined;
|
|
838
|
-
} | {
|
|
839
|
-
schema: any;
|
|
840
|
-
isDraft: boolean;
|
|
841
|
-
source: string;
|
|
842
|
-
schemaRecordId: any;
|
|
843
|
-
filePath: any;
|
|
844
|
-
dbMatchesFile: boolean;
|
|
845
|
-
} | {
|
|
846
|
-
schema: any;
|
|
847
|
-
isDraft: boolean;
|
|
848
|
-
source: string;
|
|
849
|
-
schemaRecordId: any;
|
|
850
|
-
filePath: any;
|
|
851
|
-
dbMatchesFile?: undefined;
|
|
852
|
-
})[]>;
|
|
853
|
-
/**
|
|
854
|
-
* Merge multiple EAS sync intents: full sync (no concrete address list) wins;
|
|
855
|
-
* otherwise union addresses (first-seen casing).
|
|
856
|
-
*/
|
|
857
|
-
declare function mergeEasSyncRequestIntents(parts: any): {
|
|
858
|
-
addresses?: undefined;
|
|
859
|
-
} | {
|
|
860
|
-
addresses: any[];
|
|
861
|
-
};
|
|
862
|
-
/**
|
|
863
|
-
* Wait until the read chain is known before syncing. Only waits when `@seedprotocol/publish`
|
|
864
|
-
* is loaded but `initPublish` has not run, and no chain is configured or recorded locally.
|
|
865
|
-
*/
|
|
866
|
-
declare function waitForEasReadChain(timeoutMs?: number): Promise<void>;
|
|
867
|
-
/**
|
|
868
|
-
* Read a schema file by name and version
|
|
869
|
-
* @param name - The name of the schema
|
|
870
|
-
* @param version - The version of the schema
|
|
871
|
-
* @param schemaFileId - Schema file ID (required)
|
|
872
|
-
* @returns The schema object, or null if not found
|
|
873
|
-
*/
|
|
874
|
-
declare function readSchema(name: any, version: any, schemaFileId: any): Promise<any>;
|
|
875
|
-
/**
|
|
876
|
-
* Register the SDK SQLite/files adapter with `@seedprotocol/query`.
|
|
877
|
-
* Safe to call multiple times; re-registers with a fresh adapter instance.
|
|
878
|
-
* No-op when the app DB is not ready yet (unless `force`).
|
|
879
|
-
*/
|
|
880
|
-
declare function registerSeedQueryLocalSource(options: any): boolean;
|
|
881
|
-
declare function requestEasSyncFromAddressChange(addresses: any): void;
|
|
882
948
|
/**
|
|
883
949
|
* Delete a schema file
|
|
884
950
|
* @param name - The name of the schema
|
|
@@ -930,5 +996,40 @@ declare function migrateFileSchemasToDb(): Promise<number>;
|
|
|
930
996
|
* @throws Error if schema doesn't exist
|
|
931
997
|
*/
|
|
932
998
|
declare function updateSchema(schema: any, schemaFileId: any): Promise<void>;
|
|
933
|
-
|
|
934
|
-
|
|
999
|
+
/**
|
|
1000
|
+
* Conflicts between a local edit and a value sync wrote after it (ADR 0019). The local edit wins:
|
|
1001
|
+
* a pending edit applies over the synced row as a new draft, and a draft already written stays the
|
|
1002
|
+
* newest row. The conflict is recorded on an op row, so the app can show both values and let the
|
|
1003
|
+
* user pick.
|
|
1004
|
+
*/
|
|
1005
|
+
/**
|
|
1006
|
+
* The conflict a `set` op meets when it applies: sync wrote an attested row for the property after
|
|
1007
|
+
* the edit was made, and its value differs from both the value the edit was made against and the
|
|
1008
|
+
* edit's own. A row with the base row's uid (the same attestation synced again) is not a conflict,
|
|
1009
|
+
* nor is a published row carrying the base value (a publish of the edit's base). Reads through `db`
|
|
1010
|
+
* (the op's transaction).
|
|
1011
|
+
*/
|
|
1012
|
+
declare function findSetConflict(op: any, value: any, db: any): Promise<{
|
|
1013
|
+
seedLocalId: any;
|
|
1014
|
+
propertyName: any;
|
|
1015
|
+
baseValue: any;
|
|
1016
|
+
remoteValue: any;
|
|
1017
|
+
localValue: any;
|
|
1018
|
+
remoteUid: any;
|
|
1019
|
+
opId: any;
|
|
1020
|
+
} | null>;
|
|
1021
|
+
/**
|
|
1022
|
+
* The conflict rule for rows sync just inserted (`synced`) over a local draft already written: the
|
|
1023
|
+
* draft stays the property's value. When a synced row is newer than the draft, the draft's time is
|
|
1024
|
+
* moved just past it (readers take the newest row). A conflict is recorded, on an `applied` op row
|
|
1025
|
+
* of its own, when the synced value differs from both the draft's and the attested value the draft
|
|
1026
|
+
* replaced. Properties with a pending value op are left to the drainer, which applies the same rule.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function keepLocalDraftsOverSyncedRows(synced: any): Promise<void>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Records `conflict` on the op that met it, and clears the property's earlier conflicts: a newer
|
|
1031
|
+
* local edit settles them (it was made with the synced value in view, or overrides it again).
|
|
1032
|
+
*/
|
|
1033
|
+
declare function recordPropertyEdit(op: any, conflict: any, db: any): Promise<void>;
|
|
1034
|
+
export { ClientManager$1 as $, getPublishedSeedRecord as A, getSchemaNameFromId as B, ClientManager as C, isSeedQueryLocalSourceRegistered as D, EAS_CHAIN_ID_APP_STATE_KEY as E, listCompleteSchemaFiles as F, loadAllSchemasFromDb as G, mergeEasSyncRequestIntents as H, INIT_CONFIG_CONFLICT_MESSAGE as I, readSchema as J, registerSeedQueryLocalSource as K, requestEasSyncFromAddressChange as L, requestEasSyncFromEventBus as M, requestEasSyncFromModelsInit as N, sendEasSyncClientRequest as O, setRetriesWhenOnlineEnabled as P, startEasSyncActor as Q, RelationTargetError as R, unregisterSeedQueryLocalSource as S, createRowsWrittenSignal as T, createModelsFromJson as U, getLatestSchemaVersion as V, jsonPropertiesToSchemaProperties as W, schema as X, SEEDPROTOCOL_Seed_Protocol_v1 as Y, conflicts as Z, itemAppliers as _, applyCreateItem as a, applyDelete as b, applyItemStorageValue as c, deleteFiles as d, applyStorageValue as e, getPropertyConflict as f, getItemConflicts as g, getRefValueType as h, importJsonSchema as i, syncSchemaFromSource as j, transformImportToSchemaFile as k, loadSchemaFromFile as l, markPropertyConflictsResolved as m, getContentHash as n, isVerbatimItemStorageDraftRow as o, convertVerbatimItemStorageRow as p, assertLocalDbChain as q, readJsonImportFile as r, startItemOutbox as s, throwItemWriteError as t, claimUnpublishedDrafts as u, createLocalQueryDataSource as v, waitForEasReadChain as w, createSchema as x, easSyncActor as y, getClient as z };
|
|
1035
|
+
//# sourceMappingURL=ClientManager-Dcju5x4k.d.ts.map
|